Showing
1 changed file
with
3 additions
and
5 deletions
| @@ -130,7 +130,7 @@ | @@ -130,7 +130,7 @@ | ||
| 130 | 130 | ||
| 131 | if (showAccurateProgress) { | 131 | if (showAccurateProgress) { |
| 132 | 132 | ||
| 133 | - //If this is a GET request and we want accurate progress, perform a HEAD request first to get the content-length | 133 | + // If this is a GET request and we want accurate progress, perform a HEAD request first to get the content-length |
| 134 | if ([[request requestMethod] isEqualToString:@"GET"]) { | 134 | if ([[request requestMethod] isEqualToString:@"GET"]) { |
| 135 | ASIHTTPRequest *HEADRequest = [[[ASIHTTPRequest alloc] initWithURL:[request url]] autorelease]; | 135 | ASIHTTPRequest *HEADRequest = [[[ASIHTTPRequest alloc] initWithURL:[request url]] autorelease]; |
| 136 | [HEADRequest setMainRequest:request]; | 136 | [HEADRequest setMainRequest:request]; |
| @@ -140,7 +140,7 @@ | @@ -140,7 +140,7 @@ | ||
| 140 | [request setShouldResetProgressIndicators:NO]; | 140 | [request setShouldResetProgressIndicators:NO]; |
| 141 | [request addDependency:HEADRequest]; | 141 | [request addDependency:HEADRequest]; |
| 142 | 142 | ||
| 143 | - //If we want to track uploading for this request accurately, we need to add the size of the post content to the total | 143 | + // If we want to track uploading for this request accurately, we need to add the size of the post content to the total |
| 144 | } else if (uploadProgressDelegate) { | 144 | } else if (uploadProgressDelegate) { |
| 145 | [request buildPostBody]; | 145 | [request buildPostBody]; |
| 146 | uploadProgressTotalBytes += [request postLength]; | 146 | uploadProgressTotalBytes += [request postLength]; |
| @@ -150,7 +150,7 @@ | @@ -150,7 +150,7 @@ | ||
| 150 | 150 | ||
| 151 | if (uploadProgressDelegate) { | 151 | if (uploadProgressDelegate) { |
| 152 | 152 | ||
| 153 | - //For uploads requests, we always work out the total upload size before the queue starts, so we tell the request not to reset the progress indicator when starting each request | 153 | + // For uploads requests, we always work out the total upload size before the queue starts, so we tell the request not to reset the progress indicator when starting each request |
| 154 | [request setShouldResetProgressIndicators:NO]; | 154 | [request setShouldResetProgressIndicators:NO]; |
| 155 | [request setUploadProgressDelegate:self]; | 155 | [request setUploadProgressDelegate:self]; |
| 156 | } else { | 156 | } else { |
| @@ -233,7 +233,6 @@ | @@ -233,7 +233,6 @@ | ||
| 233 | } | 233 | } |
| 234 | downloadProgressTotalBytes += bytes; | 234 | downloadProgressTotalBytes += bytes; |
| 235 | [self incrementDownloadProgressBy:0]; | 235 | [self incrementDownloadProgressBy:0]; |
| 236 | - NSLog(@"download size is now: %qu",downloadProgressTotalBytes); | ||
| 237 | } | 236 | } |
| 238 | 237 | ||
| 239 | - (void)incrementDownloadProgressBy:(unsigned long long)bytes | 238 | - (void)incrementDownloadProgressBy:(unsigned long long)bytes |
| @@ -242,7 +241,6 @@ | @@ -242,7 +241,6 @@ | ||
| 242 | return; | 241 | return; |
| 243 | } | 242 | } |
| 244 | downloadProgressBytes += bytes; | 243 | downloadProgressBytes += bytes; |
| 245 | - //NSLog(@"%qu/%qu",downloadProgressBytes,downloadProgressTotalBytes); | ||
| 246 | double progress = (downloadProgressBytes*1.0)/(downloadProgressTotalBytes*1.0); | 244 | double progress = (downloadProgressBytes*1.0)/(downloadProgressTotalBytes*1.0); |
| 247 | [ASIHTTPRequest setProgress:progress forProgressIndicator:downloadProgressDelegate]; | 245 | [ASIHTTPRequest setProgress:progress forProgressIndicator:downloadProgressDelegate]; |
| 248 | } | 246 | } |
-
Please register or login to post a comment