Differences From Artifact [ab4c72054a]:
- File
src/OFHTTPClient.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: 16015) [annotate] [blame] [check-ins using]
To Artifact [7e8bacfd9a]:
- File src/OFHTTPClient.m — part of check-in [65afbedbd4] at 2014-07-07 22:28:00 on branch trunk — OFURL: Allow all RFC 1808 compatible schemes (user: js, size: 16073) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
557 558 559 560 561 562 563 564 565 566 567 | [response setKeepAlive: true]; _socket = [socket retain]; _lastURL = [URL copy]; _lastResponse = [response retain]; } if (redirects > 0 && (status == 301 || status == 302 || status == 303 || status == 307) && (redirect = [serverHeaders objectForKey: @"Location"]) != nil && (_insecureRedirectsAllowed || [scheme isEqual: @"http"] || | > | | 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
[response setKeepAlive: true];
_socket = [socket retain];
_lastURL = [URL copy];
_lastResponse = [response retain];
}
/* FIXME: Case-insensitive check of redirect's scheme */
if (redirects > 0 && (status == 301 || status == 302 ||
status == 303 || status == 307) &&
(redirect = [serverHeaders objectForKey: @"Location"]) != nil &&
(_insecureRedirectsAllowed || [scheme isEqual: @"http"] ||
[redirect hasPrefix: @"https://"])) {
OFURL *newURL;
bool follow;
newURL = [OFURL URLWithString: redirect
relativeToURL: URL];
if ([_delegate respondsToSelector:
|
| ︙ | ︙ |