Ben Copsey

Lots of changes to fix regressions

Redirect / authentication required requests download the full response before trying again, so they can re-use the connection
Invalidate the connection when a request fails to prevent subsequent requests getting stuck on a bad line
... ... @@ -25,7 +25,6 @@ extern NSString *ASIHTTPRequestVersion;
#define __IPHONE_3_0 30000
#endif
typedef enum _ASINetworkErrorType {
ASIConnectionFailureErrorType = 1,
ASIRequestTimedOutErrorType = 2,
... ... @@ -339,6 +338,10 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
// Set to yes when an appropriate keep-alive header is found
BOOL canUsePersistentConnection;
NSTimeInterval closeStreamTime;
int usedStreamNumber;
}
#pragma mark init / dealloc
... ... @@ -431,8 +434,8 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
// Reads the response headers to find the content length, encoding, cookies for the session
// Also initiates request redirection when shouldRedirect is true
// Returns true if the request needs a username and password (or if those supplied were incorrect)
- (BOOL)readResponseHeadersReturningAuthenticationFailure;
// And works out if HTTP auth is required
- (void)readResponseHeaders;
#pragma mark http authentication stuff
... ...
This diff is collapsed. Click to expand it.
... ... @@ -320,7 +320,7 @@
request2 = [ASIFormDataRequest requestWithURL:url];
[request2 setPostValue:@"foo" forKey:@"eep"];
[request2 start];
[request2 startSynchronous];
NSString *method = @"GET";
if (i>304) {
... ...