Differences From Artifact [cb00731d28]:
- File
src/OFHTTPRequest.m
— part of check-in
[7a8056d3ed]
at
2012-09-29 10:49:05
on branch trunk
— OFHTTPRequest: Fix too early release.
The result was released before it was passed to the exception. (user: js, size: 12820) [annotate] [blame] [check-ins using]
To Artifact [4435d73c99]:
- File
src/OFHTTPRequest.m
— part of check-in
[294346482d]
at
2012-09-29 10:51:37
on branch trunk
— OFHTTPRequest: Force "Connection: close".
This should not be part of the headers dictionary as it would allow the
user to remove it, but the implementation requires it. (user: js, size: 12839) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
74 75 76 77 78 79 80 | } - init { self = [super init]; requestType = OF_HTTP_REQUEST_TYPE_GET; | | < | | > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | } - init { self = [super init]; requestType = OF_HTTP_REQUEST_TYPE_GET; headers = [[OFDictionary alloc] initWithObject: @"Something using ObjFW " @"<https://webkeks.org/objfw/>" forKey: @"User-Agent"]; storesData = YES; return self; } - initWithURL: (OFURL*)URL_ { |
︙ | ︙ | |||
249 250 251 252 253 254 255 256 257 258 259 260 261 262 | [sock writeFormat: @"%s %@ HTTP/1.1\r\n", type, path]; if ([URL port] == 80) [sock writeFormat: @"Host: %@\r\n", [URL host]]; else [sock writeFormat: @"Host: %@:%d\r\n", [URL host], [URL port]]; keyEnumerator = [headers keyEnumerator]; objectEnumerator = [headers objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) [sock writeFormat: @"%@: %@\r\n", key, object]; | > > | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | [sock writeFormat: @"%s %@ HTTP/1.1\r\n", type, path]; if ([URL port] == 80) [sock writeFormat: @"Host: %@\r\n", [URL host]]; else [sock writeFormat: @"Host: %@:%d\r\n", [URL host], [URL port]]; [sock writeString: @"Connection: close\r\n"]; keyEnumerator = [headers keyEnumerator]; objectEnumerator = [headers objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) [sock writeFormat: @"%@: %@\r\n", key, object]; |
︙ | ︙ |