Chromium Code Reviews| Index: net/url_request/url_request_http_job.cc |
| diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc |
| index b7f8d4c6d39fc9b29394320f53efedfa7c6b46df..182133a7ae806a46a5928beebcf6b38661f6fc87 100644 |
| --- a/net/url_request/url_request_http_job.cc |
| +++ b/net/url_request/url_request_http_job.cc |
| @@ -283,7 +283,22 @@ void URLRequestHttpJob::NotifyHeadersComplete() { |
| URLRequestJob::NotifyHeadersComplete(); |
| } |
| -void URLRequestHttpJob::NotifyDone(const URLRequestStatus& status) { |
| +void URLRequestHttpJob::NotifyDone(const URLRequestStatus& original_status) { |
| + URLRequestStatus status(original_status); |
| + // Some servers send the body compressed, but specify the content length as |
| + // the uncompressed size. Although this violates, the HTTP spec, we want to |
| + // support it (as IE and FireFox do), but *only* for an exact match. |
| + // See bug: 79694. |
|
Randy Smith (Not in Mondays)
2011/05/03 21:30:41
I think the proper format for this last is "See ht
ahendrickson
2011/05/04 15:08:25
Done.
|
| + if (status.os_error() == net::ERR_CONNECTION_CLOSED) { |
| + if (request_ && request_->response_headers()) { |
| + if (postfilter_bytes_read() == |
| + request_->response_headers()->GetContentLength()) { |
| + // Clear the error. |
| + status = URLRequestStatus(); |
| + } |
| + } |
| + } |
| + |
| RecordCompressionHistograms(); |
| URLRequestJob::NotifyDone(status); |
| } |