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

Unified Diff: net/http/http_stream_parser.cc

Issue 8496016: Report ERR_CONTENT_LENGTH_MISMATCH when the count of bytes received doesn't match Content-Length. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix sync case Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/http_stream_parser.cc
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 2a862204ff89bdc415a07f5ebad0f52d22070ecf..690ba1421e2f3e9a01119479673be6ea05dd0ac7 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -535,7 +535,7 @@ int HttpStreamParser::DoReadBodyComplete(int result) {
// so we don't treat that as an error, though in some cases we may not
// have completely received the resource.
if (result == 0 && !IsResponseBodyComplete() && CanFindEndOfResponse())
rvargas (doing something else) 2011/11/08 23:27:47 This not only includes content-length mismatch, bu
cbentzel 2011/11/09 01:26:09 Good point. I could imagine a new error code. I'll
cbentzel 2011/11/09 18:17:36 I tested with FF4 and FF8. Need to test with other
cbentzel 2011/11/09 18:48:35 Safari 5.1.1 on Windows will fail if the Chunked-E
- result = ERR_CONNECTION_CLOSED;
+ result = ERR_CONTENT_LENGTH_MISMATCH;
// Filter incoming data if appropriate. FilterBuf may return an error.
if (result > 0 && chunked_decoder_.get()) {

Powered by Google App Engine
This is Rietveld 408576698