Chromium Code Reviews| 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..d9b4728be82894d583c09d8488ba07a3623dc331 100644 |
| --- a/net/http/http_stream_parser.cc |
| +++ b/net/http/http_stream_parser.cc |
| @@ -534,8 +534,12 @@ int HttpStreamParser::DoReadBodyComplete(int result) { |
| // the only way to signal the end of a stream is to close the connection, |
| // 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()) |
| - result = ERR_CONNECTION_CLOSED; |
| + if (result == 0 && !IsResponseBodyComplete() && CanFindEndOfResponse()) { |
| + if (chunked_decoder_.get()) |
| + result = ERR_INVALID_CHUNKED_ENCODING; |
|
rvargas (doing something else)
2011/11/09 19:55:26
Note that this means we'll be using the same error
cbentzel
2011/11/09 20:40:53
I think it's OK to lump the chunked encoding error
|
| + else |
| + result = ERR_CONTENT_LENGTH_MISMATCH; |
| + } |
| // Filter incoming data if appropriate. FilterBuf may return an error. |
| if (result > 0 && chunked_decoder_.get()) { |