Differences From Artifact [390eee68b1]:
- File src/OFHTTPClient.m — part of check-in [842c55dd83] at 2017-09-24 17:35:04 on branch trunk — OFUDPSocket: Add support for async sending (user: js, size: 23019) [annotate] [blame] [check-ins using]
To Artifact [3d75f15cfb]:
- File
src/OFHTTPClient.m
— part of check-in
[0319fe1eb9]
at
2017-09-24 21:00:09
on branch trunk
— OFHTTPClient: Rename to -[asyncPerformRequest:]
This makes it clear that the request is handled asynchronously and makes
it possible to reintroduce a synchronous version later. (user: js, size: 23033) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
374 375 376 377 378 379 380 | } [newRequest setURL: newURL]; [newRequest setHeaders: newHeaders]; _client->_inProgress = false; | | | | 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | } [newRequest setURL: newURL]; [newRequest setHeaders: newHeaders]; _client->_inProgress = false; [_client asyncPerformRequest: newRequest redirects: _redirects - 1]; return; } } if (_status / 100 != 2) @throw [OFHTTPRequestFailedException exceptionWithRequest: _request |
| ︙ | ︙ | |||
911 912 913 914 915 916 917 |
- (void)dealloc
{
[self close];
[super dealloc];
}
| | | | | | | 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 |
- (void)dealloc
{
[self close];
[super dealloc];
}
- (void)asyncPerformRequest: (OFHTTPRequest *)request
{
[self asyncPerformRequest: request
redirects: 10];
}
- (void)asyncPerformRequest: (OFHTTPRequest *)request
redirects: (unsigned int)redirects
{
void *pool = objc_autoreleasePoolPush();
OFURL *URL = [request URL];
OFString *scheme = [URL scheme];
if (![scheme isEqual: @"http"] && ![scheme isEqual: @"https"])
@throw [OFUnsupportedProtocolException exceptionWithURL: URL];
|
| ︙ | ︙ |