Ben Copsey

Start work on porting the new threading model to NSOperationQueue

... ... @@ -342,9 +342,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
// Default is YES
BOOL shouldPresentCredentialsBeforeChallenge;
// YES when the request is run with runSynchronous, NO otherwise. READ-ONLY
BOOL isSynchronous;
// YES when the request hasn't finished yet. Will still be YES even if the request isn't doing anything (eg it's waiting for delegate authentication). READ-ONLY
BOOL inProgress;
... ... @@ -383,9 +380,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
// The stream will be closed + released either when another request comes to use the connection, or when the timer fires to tell the connection to expire
NSMutableDictionary *connectionInfo;
// This timer checks up on the request every 0.25 seconds, and updates progress
NSTimer *statusTimer;
// When set to YES, 301 and 302 automatic redirects will use the original method and and body, according to the HTTP 1.1 standard
// Default is NO (to follow the behaviour of most browsers)
BOOL shouldUseRFC2616RedirectBehaviour;
... ... @@ -689,6 +683,10 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
// And also by ASIS3Request
+ (NSString *)base64forData:(NSData *)theData;
#pragma mark request threading behaviour
+ (NSThread *)threadForRequest:(ASIHTTPRequest *)request;
#pragma mark ===
@property (retain) NSString *username;
... ... @@ -766,7 +764,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
@property (assign, readonly) int proxyAuthenticationRetryCount;
@property (assign) BOOL haveBuiltRequestHeaders;
@property (assign, nonatomic) BOOL haveBuiltPostBody;
@property (assign, readonly) BOOL isSynchronous;
@property (assign, readonly) BOOL inProgress;
@property (assign) int numberOfTimesToRetryOnTimeout;
@property (assign, readonly) int retryCount;
... ...
This diff is collapsed. Click to expand it.
... ... @@ -94,7 +94,7 @@
// Stop any other requests
[networkQueue reset];
[self setBigFetchRequest:[[[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_resume"]] autorelease]];
[self setBigFetchRequest:[ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_resume"]]];
[[self bigFetchRequest] setDownloadDestinationPath:[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"The Great American Novel.txt"]];
[[self bigFetchRequest] setTemporaryFileDownloadPath:[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"The Great American Novel.txt.download"]];
[[self bigFetchRequest] setAllowResumeForFileDownloads:YES];
... ...