Skip to content

Commit 93b2b1a

Browse files
committed
Merge branch 'master' of github.com:pokeb/asi-http-request
2 parents dab98e1 + 88a8c37 commit 93b2b1a

File tree

7 files changed

+27
-7
lines changed

7 files changed

+27
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ profile
1010
*.pbxuser
1111
*.mode1v3
1212
External/GHUnit/*
13+
.svn

Classes/ASIDataCompressor.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ + (BOOL)compressDataFromFile:(NSString *)sourcePath toFile:(NSString *)destinati
189189
// Make sure nothing went wrong
190190
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
191191
if (err) {
192-
*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]];
192+
*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]];
193193
}
194194
[compressor closeStream];
195195
return NO;

Classes/ASIDataDecompressor.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ + (BOOL)uncompressDataFromFile:(NSString *)sourcePath toFile:(NSString *)destina
186186
// Make sure nothing went wrong
187187
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
188188
if (err) {
189-
*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]];
189+
*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]];
190190
}
191191
[decompressor closeStream];
192192
return NO;

Classes/ASIHTTPRequest.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void ReadStreamClientCallBack(CFReadStreamRef readStream, CFStreamEventTy
105105

106106
// When YES, bandwidth will be automatically throttled when using WWAN (3G/Edge/GPRS)
107107
// Wifi will not be throttled
108-
static BOOL shouldThrottleBandwithForWWANOnly = NO;
108+
static BOOL shouldThrottleBandwidthForWWANOnly = NO;
109109
#endif
110110

111111
// Mediates access to the session cookies so requests
@@ -4080,6 +4080,7 @@ - (id)copyWithZone:(NSZone *)zone
40804080
[newRequest setShouldUseRFC2616RedirectBehaviour:[self shouldUseRFC2616RedirectBehaviour]];
40814081
[newRequest setShouldAttemptPersistentConnection:[self shouldAttemptPersistentConnection]];
40824082
[newRequest setPersistentConnectionTimeoutSeconds:[self persistentConnectionTimeoutSeconds]];
4083+
[newRequest setAuthenticationScheme:[self authenticationScheme]];
40834084
return newRequest;
40844085
}
40854086

@@ -4492,7 +4493,7 @@ + (BOOL)isBandwidthThrottled
44924493
#if TARGET_OS_IPHONE
44934494
[bandwidthThrottlingLock lock];
44944495

4495-
BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && (maxBandwidthPerSecond > 0));
4496+
BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwidthForWWANOnly && (maxBandwidthPerSecond > 0));
44964497
[bandwidthThrottlingLock unlock];
44974498
return throttle;
44984499
#else
@@ -4572,7 +4573,7 @@ + (void)measureBandwidthUsage
45724573
// Are we performing bandwidth throttling?
45734574
if (
45744575
#if TARGET_OS_IPHONE
4575-
isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && (maxBandwidthPerSecond))
4576+
isBandwidthThrottled || (!shouldThrottleBandwidthForWWANOnly && (maxBandwidthPerSecond))
45764577
#else
45774578
maxBandwidthPerSecond
45784579
#endif
@@ -4624,15 +4625,15 @@ + (void)setShouldThrottleBandwidthForWWAN:(BOOL)throttle
46244625
[ASIHTTPRequest setMaxBandwidthPerSecond:0];
46254626
[bandwidthThrottlingLock lock];
46264627
isBandwidthThrottled = NO;
4627-
shouldThrottleBandwithForWWANOnly = NO;
4628+
shouldThrottleBandwidthForWWANOnly = NO;
46284629
[bandwidthThrottlingLock unlock];
46294630
}
46304631
}
46314632

46324633
+ (void)throttleBandwidthForWWANUsingLimit:(unsigned long)limit
46334634
{
46344635
[bandwidthThrottlingLock lock];
4635-
shouldThrottleBandwithForWWANOnly = YES;
4636+
shouldThrottleBandwidthForWWANOnly = YES;
46364637
maxBandwidthPerSecond = limit;
46374638
[ASIHTTPRequest registerForNetworkReachabilityNotifications];
46384639
[bandwidthThrottlingLock unlock];

Classes/CloudFiles/ASICloudFilesContainer.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ + (id)container {
2222

2323
-(void) dealloc {
2424
[name release];
25+
[cdnURL release];
26+
[referrerACL release];
27+
[useragentACL release];
2528
[super dealloc];
2629
}
2730

Classes/S3/ASIS3Bucket.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,13 @@ - (NSString *)description
2929
@synthesize creationDate;
3030
@synthesize ownerID;
3131
@synthesize ownerName;
32+
33+
- (void)dealloc
34+
{
35+
[name release];
36+
[creationDate release];
37+
[ownerID release];
38+
[ownerName release];
39+
}
40+
3241
@end

iPhone Sample/RootViewController.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ - (void)splitViewController:(UISplitViewController *)svc popoverController: (UIP
115115
}
116116
}
117117

118+
- (void)dealloc
119+
{
120+
[popoverController release];
121+
[rootPopoverButtonItem release];
122+
[super dealloc];
123+
}
118124

119125
@synthesize splitViewController;
120126
@synthesize popoverController;

0 commit comments

Comments
 (0)