Permalink
Browse files

Merge branch 'master' of github.com:pokeb/asi-http-request

  • Loading branch information...
pokeb committed Sep 17, 2011
2 parents dab98e1 + 88a8c37 commit 93b2b1a3dbc7e19a2d059a55f4b3ee284805c269
View
@@ -10,3 +10,4 @@ profile
*.pbxuser
*.mode1v3
External/GHUnit/*
+.svn
@@ -189,7 +189,7 @@ + (BOOL)compressDataFromFile:(NSString *)sourcePath toFile:(NSString *)destinati
// Make sure nothing went wrong
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
if (err) {
- *err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of %@ failed because we were unable to write to the destination data file at &@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
+ *err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of %@ failed because we were unable to write to the destination data file at %@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
}
[compressor closeStream];
return NO;
@@ -186,7 +186,7 @@ + (BOOL)uncompressDataFromFile:(NSString *)sourcePath toFile:(NSString *)destina
// Make sure nothing went wrong
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
if (err) {
- *err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of %@ failed because we were unable to write to the destination data file at &@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
+ *err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of %@ failed because we were unable to write to the destination data file at %@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
}
[decompressor closeStream];
return NO;
View
@@ -105,7 +105,7 @@ static void ReadStreamClientCallBack(CFReadStreamRef readStream, CFStreamEventTy
// When YES, bandwidth will be automatically throttled when using WWAN (3G/Edge/GPRS)
// Wifi will not be throttled
-static BOOL shouldThrottleBandwithForWWANOnly = NO;
+static BOOL shouldThrottleBandwidthForWWANOnly = NO;
#endif
// Mediates access to the session cookies so requests
@@ -4080,6 +4080,7 @@ - (id)copyWithZone:(NSZone *)zone
[newRequest setShouldUseRFC2616RedirectBehaviour:[self shouldUseRFC2616RedirectBehaviour]];
[newRequest setShouldAttemptPersistentConnection:[self shouldAttemptPersistentConnection]];
[newRequest setPersistentConnectionTimeoutSeconds:[self persistentConnectionTimeoutSeconds]];
+ [newRequest setAuthenticationScheme:[self authenticationScheme]];
return newRequest;
}
@@ -4492,7 +4493,7 @@ + (BOOL)isBandwidthThrottled
#if TARGET_OS_IPHONE
[bandwidthThrottlingLock lock];
- BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && (maxBandwidthPerSecond > 0));
+ BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwidthForWWANOnly && (maxBandwidthPerSecond > 0));
[bandwidthThrottlingLock unlock];
return throttle;
#else
@@ -4572,7 +4573,7 @@ + (void)measureBandwidthUsage
// Are we performing bandwidth throttling?
if (
#if TARGET_OS_IPHONE
- isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && (maxBandwidthPerSecond))
+ isBandwidthThrottled || (!shouldThrottleBandwidthForWWANOnly && (maxBandwidthPerSecond))
#else
maxBandwidthPerSecond
#endif
@@ -4624,15 +4625,15 @@ + (void)setShouldThrottleBandwidthForWWAN:(BOOL)throttle
[ASIHTTPRequest setMaxBandwidthPerSecond:0];
[bandwidthThrottlingLock lock];
isBandwidthThrottled = NO;
- shouldThrottleBandwithForWWANOnly = NO;
+ shouldThrottleBandwidthForWWANOnly = NO;
[bandwidthThrottlingLock unlock];
}
}
+ (void)throttleBandwidthForWWANUsingLimit:(unsigned long)limit
{
[bandwidthThrottlingLock lock];
- shouldThrottleBandwithForWWANOnly = YES;
+ shouldThrottleBandwidthForWWANOnly = YES;
maxBandwidthPerSecond = limit;
[ASIHTTPRequest registerForNetworkReachabilityNotifications];
[bandwidthThrottlingLock unlock];
@@ -22,6 +22,9 @@ + (id)container {
-(void) dealloc {
[name release];
+ [cdnURL release];
+ [referrerACL release];
+ [useragentACL release];
[super dealloc];
}
View
@@ -29,4 +29,13 @@ - (NSString *)description
@synthesize creationDate;
@synthesize ownerID;
@synthesize ownerName;
+
+- (void)dealloc
+{
+ [name release];
+ [creationDate release];
+ [ownerID release];
+ [ownerName release];
+}
+
@end
@@ -115,6 +115,12 @@ - (void)splitViewController:(UISplitViewController *)svc popoverController: (UIP
}
}
+- (void)dealloc
+{
+ [popoverController release];
+ [rootPopoverButtonItem release];
+ [super dealloc];
+}
@synthesize splitViewController;
@synthesize popoverController;

0 comments on commit 93b2b1a

Please sign in to comment.