Differences From Artifact [bcc6187243]:
- File
src/OFURL.m
— part of check-in
[13ee56edf3]
at
2014-06-21 21:43:43
on branch trunk
— Move all macros from OFObject.h to macros.h
This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. (user: js, size: 10458) [annotate] [blame] [check-ins using]
To Artifact [2209074f5b]:
- File
src/OFURL.m
— part of check-in
[d2487bc7e1]
at
2014-07-07 00:50:01
on branch trunk
— OFURL: Don't include the leading "/" in path
While Cocoa includes it, RFC 1738 explicitly states that the "/" between
host / port and path is not part of the path. (user: js, size: 10442) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
154 155 156 157 158 159 160 | if ((tmp = strchr(UTF8String, ';')) != NULL) { *tmp = '\0'; _parameters = [[OFString alloc] initWithUTF8String: tmp + 1]; } | | | < < > | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | if ((tmp = strchr(UTF8String, ';')) != NULL) { *tmp = '\0'; _parameters = [[OFString alloc] initWithUTF8String: tmp + 1]; } _path = [[OFString alloc] initWithUTF8String: UTF8String]; } } @catch (id e) { [self release]; @throw e; } @finally { free(UTF8String2); } |
︙ | ︙ | |||
213 214 215 216 217 218 219 | *tmp = '\0'; _parameters = [[OFString alloc] initWithUTF8String: tmp + 1]; } if (*UTF8String == '/') _path = [[OFString alloc] | | | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | *tmp = '\0'; _parameters = [[OFString alloc] initWithUTF8String: tmp + 1]; } if (*UTF8String == '/') _path = [[OFString alloc] initWithUTF8String: UTF8String + 1]; else { void *pool; OFString *s; pool = objc_autoreleasePoolPush(); if ([URL->_path hasSuffix: @"/"]) |
︙ | ︙ | |||
478 479 480 481 482 483 484 | [ret appendString: _host]; if (([_scheme isEqual: @"http"] && _port != 80) || ([_scheme isEqual: @"https"] && _port != 443)) [ret appendFormat: @":%u", _port]; if (_path != nil) | | | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | [ret appendString: _host]; if (([_scheme isEqual: @"http"] && _port != 80) || ([_scheme isEqual: @"https"] && _port != 443)) [ret appendFormat: @":%u", _port]; if (_path != nil) [ret appendFormat: @"/%@", _path]; if (_parameters != nil) [ret appendFormat: @";%@", _parameters]; if (_query != nil) [ret appendFormat: @"?%@", _query]; |
︙ | ︙ |