Differences From Artifact [3385dc4745]:
- File src/OFHTTPClient.m — part of check-in [e3de40a9b9] at 2017-10-07 15:19:19 on branch trunk — OFHTTPClient: Fix missing exception handling (user: js, size: 23749) [annotate] [blame] [check-ins using]
To Artifact [901849c7c7]:
- File
src/OFHTTPClient.m
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 23833) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
52 53 54 55 56 57 58 | id _context; bool _firstLine; OFString *_version; int _status; OFMutableDictionary OF_GENERIC(OFString *, OFString *) *_serverHeaders; } | | | | | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
id _context;
bool _firstLine;
OFString *_version;
int _status;
OFMutableDictionary OF_GENERIC(OFString *, OFString *) *_serverHeaders;
}
- (instancetype)initWithClient: (OFHTTPClient *)client
request: (OFHTTPRequest *)request
redirects: (unsigned int)redirects
context: (id)context;
- (void)start;
- (void)closeAndReconnect;
@end
@interface OFHTTPClientResponse: OFHTTPResponse
{
OFTCPSocket *_socket;
bool _hasContentLength, _chunked, _keepAlive, _atEndOfStream;
size_t _toRead;
}
@property (nonatomic, setter=of_setKeepAlive:) bool of_keepAlive;
- (instancetype)initWithSocket: (OFTCPSocket *)socket;
@end
static OFString *
constructRequestString(OFHTTPRequest *request)
{
void *pool = objc_autoreleasePoolPush();
of_http_request_method_t method = [request method];
|
| ︙ | ︙ | |||
201 202 203 204 205 206 207 | firstLetter = false; str++; } } @implementation OFHTTPClientRequestHandler | | | | | | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
firstLetter = false;
str++;
}
}
@implementation OFHTTPClientRequestHandler
- (instancetype)initWithClient: (OFHTTPClient *)client
request: (OFHTTPRequest *)request
redirects: (unsigned int)redirects
context: (id)context
{
self = [super init];
@try {
_client = [client retain];
_request = [request retain];
_redirects = redirects;
|
| ︙ | ︙ | |||
726 727 728 729 730 731 732 | context: nil]; } @end @implementation OFHTTPClientResponse @synthesize of_keepAlive = _keepAlive; | | | 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
context: nil];
}
@end
@implementation OFHTTPClientResponse
@synthesize of_keepAlive = _keepAlive;
- (instancetype)initWithSocket: (OFTCPSocket *)socket
{
self = [super init];
_socket = [socket retain];
return self;
}
|
| ︙ | ︙ |