Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Issue 8862009: Revert 110505 - Report ERR_CONTENT_LENGTH_MISMATCH when the count of bytes received doesn't match... (Closed)

Created:
9 years ago by cbentzel
Modified:
9 years ago
Reviewers:
cbentzel
CC:
chromium-reviews, cbentzel+watch_chromium.org, jam, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr., mmenke
Visibility:
Public.

Description

Revert 110505 - Report ERR_CONTENT_LENGTH_MISMATCH when the count of bytes received doesn't match Content-Length. This used to be reported as ERR_CONNECTION_CLOSED. Unfortunately, there are a number of misconfigured servers on the web which report a Content-Length completely divorced from reality. Other browsers display whatever data was received without reporting errors in this case, and Chrome now does the same. An earlier CL simply removed error reporting for this case. However, some uses may want to still treat this like an error (such as URLFetcher), or could eventually treat the case as an error and recover (such as downloads). Data received will be populated in the disk cache as a truncated entry, if the server advertises byte range support. WebURLLoaderImpl ignores this for all async and sync resource loads. At some point it may want to selectively do this based on content type. Downloads ignore the error, but no longer ignore ERR_CONNECTION_CLOSED. Other uses will treat this like an error. BUG=52847 TEST=Manually, go to a site that advertises a large content-length and closes the connection before writing so many bytes, and notice that the page now displays. Automatic: HttpNetworkTransactionTest.LargeContentLengthThenClose, URLRequestTestHttp.GetZippedTest Review URL: http://codereview.chromium.org/8496016 TBR=cbentzel@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113515

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -55 lines) Patch
M content/browser/download/download_resource_handler.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M net/base/net_error_list.h View 1 chunk +0 lines, -3 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_stream_parser.cc View 1 chunk +6 lines, -32 lines 0 comments Download
M net/url_request/url_request_http_job.h View 1 chunk +7 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 3 chunks +28 lines, -0 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/glue/weburlloader_impl.cc View 2 chunks +1 line, -11 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
cbentzel
9 years ago (2011-12-08 00:27:02 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698