Basil Shkara
Committed by Ben Copsey

Added property to switch HTTP version.

Signed-off-by: Ben Copsey <ben@allseeing-i.com>
... ... @@ -212,6 +212,7 @@ typedef enum _ASINetworkErrorType {
// Custom user information assosiated with the request
NSDictionary *userInfo;
BOOL HTTPVersionOne;
}
... ... @@ -395,5 +396,6 @@ typedef enum _ASINetworkErrorType {
@property (retain) NSInputStream *postBodyReadStream;
@property (assign) BOOL shouldStreamPostDataFromDisk;
@property (assign) BOOL didCreateTemporaryPostDataFile;
@property (assign) BOOL HTTPVersionOne;
@end
... ...
... ... @@ -301,7 +301,7 @@ static NSError *ASIUnableToCreateRequestError;
}
// Create a new HTTP request.
request = CFHTTPMessageCreateRequest(kCFAllocatorDefault, (CFStringRef)requestMethod, (CFURLRef)url, kCFHTTPVersion1_1);
request = CFHTTPMessageCreateRequest(kCFAllocatorDefault, (CFStringRef)requestMethod, (CFURLRef)url, self.HTTPVersionOne ? kCFHTTPVersion1_0 : kCFHTTPVersion1_1);
if (!request) {
[self failWithError:ASIUnableToCreateRequestError];
return;
... ... @@ -1625,4 +1625,5 @@ static NSError *ASIUnableToCreateRequestError;
@synthesize postBodyReadStream;
@synthesize shouldStreamPostDataFromDisk;
@synthesize didCreateTemporaryPostDataFile;
@synthesize HTTPVersionOne;
@end
... ...