diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-13 00:45:27 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-13 00:45:27 +0000 |
commit | 231d5a36e476d013a91ca742bb8a0a2973cfee54 (patch) | |
tree | dc5c60f8fc054503f4971b770196ed89fbfc18c1 /net/http/http_network_transaction.h | |
parent | f4f2df8024d7adf583a61b742a32eaa17522f154 (diff) | |
download | chromium_src-231d5a36e476d013a91ca742bb8a0a2973cfee54.zip chromium_src-231d5a36e476d013a91ca742bb8a0a2973cfee54.tar.gz chromium_src-231d5a36e476d013a91ca742bb8a0a2973cfee54.tar.bz2 |
misc. http response status-line changes:
1. check for http 0.9 responses (no status line)
2. allow up to 4 bytes of junk to precede the http version.
3. distinguish between the parsed vs normalized http version (a TODO needed this).
Review URL: http://codereview.chromium.org/1934
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.h')
-rw-r--r-- | net/http/http_network_transaction.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h index 0333222..07e2da6 100644 --- a/net/http/http_network_transaction.h +++ b/net/http/http_network_transaction.h @@ -82,6 +82,13 @@ class HttpNetworkTransaction : public HttpTransaction { // is returned. int HandleIOError(int error); + // Return true if based on the bytes read so far, the start of the + // status line is known. This is used to distingish between HTTP/0.9 + // responses (which have no status line). + bool has_found_status_line_start() const { + return header_buf_http_offset_ != -1; + } + CompletionCallbackImpl<HttpNetworkTransaction> io_callback_; CompletionCallback* user_callback_; @@ -124,6 +131,8 @@ class HttpNetworkTransaction : public HttpTransaction { int header_buf_len_; int header_buf_body_offset_; enum { kHeaderBufInitialSize = 4096 }; + // The position where status line starts; -1 if not found yet. + int header_buf_http_offset_; // Indicates the content length remaining to read. If this value is less // than zero (and chunked_decoder_ is null), then we read until the server |