DescriptionReport 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
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110505
Patch Set 1 #Patch Set 2 : Restrict to async loader only #Patch Set 3 : Fix sync case #
Total comments: 6
Patch Set 4 : Chunked encoding, test fix #
Total comments: 2
Patch Set 5 : Improve comment #
Total comments: 2
Patch Set 6 : Clear error #
Messages
Total messages: 15 (0 generated)
|