diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-18 23:01:31 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-18 23:01:31 +0000 |
commit | 95ca0dbd7c9792b7390d4577e94f3b4c55929a5b (patch) | |
tree | 16b35ffafb5019f41b4939bf8f6a153f219d2592 /net/http/http_chunked_decoder.cc | |
parent | d0d98329ebf165472c5142765fbe441d98f980af (diff) | |
download | chromium_src-95ca0dbd7c9792b7390d4577e94f3b4c55929a5b.zip chromium_src-95ca0dbd7c9792b7390d4577e94f3b4c55929a5b.tar.gz chromium_src-95ca0dbd7c9792b7390d4577e94f3b4c55929a5b.tar.bz2 |
change error value
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_chunked_decoder.cc')
-rw-r--r-- | net/http/http_chunked_decoder.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/http/http_chunked_decoder.cc b/net/http/http_chunked_decoder.cc index 1afe0f2..43dc71f 100644 --- a/net/http/http_chunked_decoder.cc +++ b/net/http/http_chunked_decoder.cc @@ -116,7 +116,7 @@ int HttpChunkedDecoder::ScanForChunkRemaining(const char* buf, int buf_len) { } else if (chunk_terminator_remaining_) { if (buf_len) { DLOG(ERROR) << "chunk data not terminated properly"; - return ERR_BAD_CHUNKED_ENCODING; + return ERR_INVALID_CHUNKED_ENCODING; } chunk_terminator_remaining_ = false; } else if (buf_len) { @@ -128,14 +128,14 @@ int HttpChunkedDecoder::ScanForChunkRemaining(const char* buf, int buf_len) { if (!ParseChunkSize(buf, buf_len, &chunk_remaining_)) { DLOG(ERROR) << "Failed parsing HEX from: " << std::string(buf, buf_len); - return ERR_BAD_CHUNKED_ENCODING; + return ERR_INVALID_CHUNKED_ENCODING; } if (chunk_remaining_ == 0) reached_last_chunk_ = true; } else { DLOG(ERROR) << "missing chunk-size"; - return ERR_BAD_CHUNKED_ENCODING; + return ERR_INVALID_CHUNKED_ENCODING; } line_buf_.clear(); } else { @@ -154,7 +154,7 @@ int HttpChunkedDecoder::ScanForChunkRemaining(const char* buf, int buf_len) { // While the HTTP 1.1 specification defines chunk-size as 1*HEX // some sites rely on more lenient parsing. -// yahoo.com for example, includes trailing spaces (0x20). +// http://www.yahoo.com/ for example, includes trailing spaces (0x20). // // A comparison of browsers running on WindowsXP shows that // they will parse the following inputs (egrep syntax): @@ -170,7 +170,7 @@ int HttpChunkedDecoder::ScanForChunkRemaining(const char* buf, int buf_len) { // Our strategy is to be as strict as possible, while not breaking // known sites. // -// Chromium: ^\X+[ ]*$ +// Us: ^\X+[ ]*$ bool HttpChunkedDecoder::ParseChunkSize(const char* start, int len, int* out) { DCHECK(len >= 0); |