diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-18 21:00:32 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-18 21:00:32 +0000 |
commit | 2d2697f9ae8f588c104c017209c1e6158ab53c25 (patch) | |
tree | a9470736768a765a341455d987440650ad6d3dc0 /net/http/http_network_transaction.h | |
parent | 2072f00ba9832d7a3185917a70153415e0866dc1 (diff) | |
download | chromium_src-2d2697f9ae8f588c104c017209c1e6158ab53c25.zip chromium_src-2d2697f9ae8f588c104c017209c1e6158ab53c25.tar.gz chromium_src-2d2697f9ae8f588c104c017209c1e6158ab53c25.tar.bz2 |
Perform HTTP authentication over a keep-alive connection.
This is required for NTLM authentication.
R=eroman
BUG=6567,6824
Review URL: http://codereview.chromium.org/21433
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.h')
-rw-r--r-- | net/http/http_network_transaction.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h index 9a4c619..4ebc89a 100644 --- a/net/http/http_network_transaction.h +++ b/net/http/http_network_transaction.h @@ -75,6 +75,8 @@ class HttpNetworkTransaction : public HttpTransaction { int DoReadHeadersComplete(int result); int DoReadBody(); int DoReadBodyComplete(int result); + int DoDrainBodyForAuthRestart(); + int DoDrainBodyForAuthRestartComplete(int result); // Record histogram of latency (first byte sent till last byte received) as // well as effective bandwidth used. @@ -126,6 +128,11 @@ class HttpNetworkTransaction : public HttpTransaction { // Sets up the state machine to restart the transaction with auth. void PrepareForAuthRestart(HttpAuth::Target target); + // Called when we don't need to drain the response body or have drained it. + // Resets |connection_| unless |keep_alive| is true, then calls + // ResetStateForRestart. Sets |next_state_| appropriately. + void DidDrainBodyForAuthRestart(bool keep_alive); + // Resets the members of the transaction so it can be restarted. void ResetStateForRestart(); @@ -245,6 +252,11 @@ class HttpNetworkTransaction : public HttpTransaction { // Note: |kMaxHeaderBufSize| should be a multiple of |kHeaderBufInitialSize|. enum { kMaxHeaderBufSize = 32768 }; // 32 kilobytes. + // The size in bytes of the buffer we use to drain the response body that + // we want to throw away. The response body is typically a small error + // page just a few hundred bytes long. + enum { kDrainBodyBufferSize = 1024 }; + // The position where status line starts; -1 if not found yet. int header_buf_http_offset_; @@ -281,6 +293,8 @@ class HttpNetworkTransaction : public HttpTransaction { STATE_READ_HEADERS_COMPLETE, STATE_READ_BODY, STATE_READ_BODY_COMPLETE, + STATE_DRAIN_BODY_FOR_AUTH_RESTART, + STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, STATE_NONE }; State next_state_; |