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.

--HG--
extra : rebase_source : c6d9cb95d2d1cac30bc718884eb3b909db0d6a43
This commit is contained in:
Patrick McManus 2011-03-23 11:02:33 -04:00
Родитель 307369ead7
Коммит b5d8b20fa4
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -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