Permalink
Browse files

Adding HTTP Version accessors to request

  • Loading branch information...
1 parent f99ca46 commit 7c2c959ff04a55cf7a70d904374355c1488530c4 @snaggled committed May 31, 2012
Showing with 10 additions and 2 deletions.
  1. +5 −1 Classes/ASIHTTPRequest.h
  2. +5 −1 Classes/ASIHTTPRequest.m
View
@@ -260,9 +260,12 @@ typedef void (^ASIDataBlock)(NSData *data);
// HTTP status code, eg: 200 = OK, 404 = Not found etc
int responseStatusCode;
-
+
// Description of the HTTP status code
NSString *responseStatusMessage;
+
+ // HTTP Version, e.g. 1.0, 1.1 etc
+ NSString *responseHTTPVersion;
// Size of the response
unsigned long long contentLength;
@@ -944,6 +947,7 @@ typedef void (^ASIDataBlock)(NSData *data);
@property (retain) NSDictionary *proxyCredentials;
@property (assign,readonly) int responseStatusCode;
@property (retain,readonly) NSString *responseStatusMessage;
+@property (retain,readonly) NSString *responseHTTPVersion;
@property (retain) NSMutableData *rawResponseData;
@property (assign) NSTimeInterval timeOutSeconds;
@property (retain, nonatomic) NSString *requestMethod;
View
@@ -24,7 +24,7 @@
#import "ASIDataCompressor.h"
// Automatically set on build
-NSString *ASIHTTPRequestVersion = @"v1.8.1-61 2011-09-19";
+NSString *ASIHTTPRequestVersion = @"v1.8.1-79 2012-05-31";
static NSString *defaultUserAgent = nil;
@@ -225,6 +225,7 @@ - (void)callBlock:(ASIBasicBlock)block;
@property (retain) NSString *authenticationRealm;
@property (retain) NSString *proxyAuthenticationRealm;
@property (retain) NSString *responseStatusMessage;
+@property (retain) NSString *responseHTTPVersion;
@property (assign) BOOL inProgress;
@property (assign) int retryCount;
@property (assign) BOOL willRetryRequest;
@@ -389,6 +390,7 @@ - (void)dealloc
[PACurl release];
[clientCertificates release];
[responseStatusMessage release];
+ [responseHTTPVersion release];
[connectionInfo release];
[requestID release];
[dataDecompressor release];
@@ -2155,6 +2157,7 @@ - (void)readResponseHeaders
[self setResponseHeaders:[NSMakeCollectable(CFHTTPMessageCopyAllHeaderFields(message)) autorelease]];
[self setResponseStatusCode:(int)CFHTTPMessageGetResponseStatusCode(message)];
[self setResponseStatusMessage:[NSMakeCollectable(CFHTTPMessageCopyResponseStatusLine(message)) autorelease]];
+ [self setResponseHTTPVersion:[NSMakeCollectable(CFHTTPMessageCopyVersion(message)) autorelease]];
if ([self downloadCache] && ([[self downloadCache] canUseCachedDataForRequest:self])) {
@@ -5086,6 +5089,7 @@ - (void)setRequestRedirectedBlock:(ASIBasicBlock)aRedirectBlock
@synthesize shouldPresentProxyAuthenticationDialog;
@synthesize authenticationNeeded;
@synthesize responseStatusMessage;
+@synthesize responseHTTPVersion;
@synthesize shouldPresentCredentialsBeforeChallenge;
@synthesize haveBuiltRequestHeaders;
@synthesize inProgress;

0 comments on commit 7c2c959

Please sign in to comment.