Ben Copsey

PAC files can now be downloaded asynchronously, and the download now respects the request's timeout

This should help in situations where the PAC File is unavailable or the connection is very slow
... ... @@ -478,7 +478,22 @@ typedef void (^ASIDataBlock)(NSData *data);
//
// Setting this to NO may be especially useful for users using ASIHTTPRequest in conjunction with a streaming parser, as it will allow partial gzipped responses to be inflated and passed on to the parser while the request is still running
BOOL shouldWaitToInflateCompressedResponses;
// Will be YES if this is a request created behind the scenes to download a PAC file - these requests do not attempt to configure their own proxies
BOOL isPACFileRequest;
// Used for downloading PAC files from http / https webservers
ASIHTTPRequest *PACFileRequest;
// Used for asynchronously reading PAC files from file:// URLs
NSInputStream *PACFileReadStream;
// Used for storing PAC data from file URLs as it is downloaded
NSMutableData *PACFileData;
// Set to YES in startSynchronous. Currently used by proxy detection to download PAC files synchronously when appropriate
BOOL isSynchronous;
#if NS_BLOCKS_AVAILABLE
//block to execute when request starts
ASIBasicBlock startedBlock;
... ... @@ -780,11 +795,6 @@ typedef void (^ASIDataBlock)(NSData *data);
// Is only used when you have specified a Bundle Display Name (CFDisplayBundleName) or Bundle Name (CFBundleName) in your plist
+ (NSString *)defaultUserAgentString;
#pragma mark proxy autoconfiguration
// Returns an array of proxies to use for a particular url, given the url of a PAC script
+ (NSArray *)proxiesForURL:(NSURL *)theURL fromPAC:(NSURL *)pacScriptURL;
#pragma mark mime-type detection
// Return the mime type for a file
... ...
This diff is collapsed. Click to expand it.