Showing
1 changed file
with
2 additions
and
1 deletions
| @@ -681,7 +681,7 @@ static BOOL isiPhoneOS2; | @@ -681,7 +681,7 @@ static BOOL isiPhoneOS2; | ||
| 681 | } else { | 681 | } else { |
| 682 | 682 | ||
| 683 | // If we have a request body, we'll stream it from memory using our custom stream, so that we can measure bandwidth use and it can be bandwidth-throttled if nescessary | 683 | // If we have a request body, we'll stream it from memory using our custom stream, so that we can measure bandwidth use and it can be bandwidth-throttled if nescessary |
| 684 | - if ([self postBody]) { | 684 | + if ([self postBody] && [[self postBody] length] > 0) { |
| 685 | if ([self shouldCompressRequestBody] && [self compressedPostBody]) { | 685 | if ([self shouldCompressRequestBody] && [self compressedPostBody]) { |
| 686 | [self setPostBodyReadStream:[ASIInputStream inputStreamWithData:[self compressedPostBody]]]; | 686 | [self setPostBodyReadStream:[ASIInputStream inputStreamWithData:[self compressedPostBody]]]; |
| 687 | } else if ([self postBody]) { | 687 | } else if ([self postBody]) { |
| @@ -2196,6 +2196,7 @@ static BOOL isiPhoneOS2; | @@ -2196,6 +2196,7 @@ static BOOL isiPhoneOS2; | ||
| 2196 | [rawResponseData appendBytes:buffer length:bytesRead]; | 2196 | [rawResponseData appendBytes:buffer length:bytesRead]; |
| 2197 | } | 2197 | } |
| 2198 | } | 2198 | } |
| 2199 | + | ||
| 2199 | } | 2200 | } |
| 2200 | 2201 | ||
| 2201 | - (void)handleStreamComplete | 2202 | - (void)handleStreamComplete |
-
Please register or login to post a comment