mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Compatibility fix.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15609 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9d1a33f8d1
commit
590043c595
2 changed files with 20 additions and 2 deletions
|
@ -528,8 +528,21 @@ static void unescape(const char *from, char * to)
|
|||
{
|
||||
if ([aPath length] > 0)
|
||||
{
|
||||
aUrlString = [aUrlString initWithFormat: @"%@://%@/%@",
|
||||
aScheme, aHost, aPath];
|
||||
/*
|
||||
* For MacOS-X compatibility, assume a path component with
|
||||
* a leading slash is intended to have that slash separating
|
||||
* the host from the path as specified in the RFC1738
|
||||
*/
|
||||
if ([aPath hasPrefix: @"/"] == YES)
|
||||
{
|
||||
aUrlString = [aUrlString initWithFormat: @"%@://%@%@",
|
||||
aScheme, aHost, aPath];
|
||||
}
|
||||
else
|
||||
{
|
||||
aUrlString = [aUrlString initWithFormat: @"%@://%@/%@",
|
||||
aScheme, aHost, aPath];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue