diff options
author | Kristian Monsen <kristianm@google.com> | 2011-09-20 14:15:35 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-09-20 14:15:35 -0700 |
commit | b5e092bbc762e180fa582a1c48da5c3e8d4b872d (patch) | |
tree | 437786ad40b9f1974b704022e81c249f5fa517ac | |
parent | ea6f156e4c1dd03cb9cb61b81882434d1f52fc48 (diff) | |
parent | e4aeb840e5cd2acd20cf6b18af808af55a92e745 (diff) | |
download | external_chromium-b5e092bbc762e180fa582a1c48da5c3e8d4b872d.zip external_chromium-b5e092bbc762e180fa582a1c48da5c3e8d4b872d.tar.gz external_chromium-b5e092bbc762e180fa582a1c48da5c3e8d4b872d.tar.bz2 |
am e4aeb840: Reapply: Fix for bug 5226268 [Browser] http keep-alive
* commit 'e4aeb840e5cd2acd20cf6b18af808af55a92e745':
Reapply: Fix for bug 5226268 [Browser] http keep-alive
-rw-r--r-- | net/http/http_basic_stream.cc | 6 | ||||
-rw-r--r-- | net/socket/tcp_client_socket_libevent.cc | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc index 6501a59..076d18f 100644 --- a/net/http/http_basic_stream.cc +++ b/net/http/http_basic_stream.cc @@ -72,7 +72,13 @@ int HttpBasicStream::ReadResponseBody(IOBuffer* buf, int buf_len, } void HttpBasicStream::Close(bool not_reusable) { +#ifdef ANDROID + // Disable connection reuse for bug 5226268 + // [Browser] http keep-alive packets are sent too frequently to network + parser_->Close(true); +#else parser_->Close(not_reusable); +#endif } HttpStream* HttpBasicStream::RenewStreamForAuth() { diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc index ed9d87d..f820955 100644 --- a/net/socket/tcp_client_socket_libevent.cc +++ b/net/socket/tcp_client_socket_libevent.cc @@ -528,7 +528,12 @@ int TCPClientSocketLibevent::SetupSocket() { // This mirrors the behaviour on Windows. See the comment in // tcp_client_socket_win.cc after searching for "NODELAY". DisableNagle(socket_); // If DisableNagle fails, we don't care. + + // ANDROID: Disable TCP keep-alive for bug 5226268 + // [Browser] http keep-alive packets are sent too frequently to network +#ifndef ANDROID SetTCPKeepAlive(socket_); +#endif #ifdef ANDROID if (valid_uid_) |