From 157bd1d75c46409151a2974bc9a828f0f8f02486 Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Wed, 23 Mar 2011 11:02:33 -0400 Subject: [PATCH] Bug 643352 keep-alive header syntax invalid r=bz don't send the keep-alive request header. It is redundant to connection: keep-alive and we don't send the right syntax anyhow. --- netwerk/protocol/http/nsHttpHandler.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index f2d1e81231d..0e5b0c8d8f6 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -394,15 +394,14 @@ nsHttpHandler::AddStandardRequestHeaders(nsHttpHeaderArray *request, // // However, we need to send something so that we can use keepalive // with HTTP/1.0 servers/proxies. We use "Proxy-Connection:" when - // we're talking to an http proxy, and "Connection:" otherwise + // we're talking to an http proxy, and "Connection:" otherwise. + // We no longer send the Keep-Alive request header. NS_NAMED_LITERAL_CSTRING(close, "close"); NS_NAMED_LITERAL_CSTRING(keepAlive, "keep-alive"); const nsACString *connectionType = &close; if (caps & NS_HTTP_ALLOW_KEEPALIVE) { - rv = request->SetHeader(nsHttp::Keep_Alive, nsPrintfCString("%u", mIdleTimeout)); - if (NS_FAILED(rv)) return rv; connectionType = &keepAlive; } else if (useProxy) { // Bug 92006