diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp index ff024cf27d9c..249813b162a8 100644 --- a/netwerk/protocol/http/nsHttpConnection.cpp +++ b/netwerk/protocol/http/nsHttpConnection.cpp @@ -1759,14 +1759,11 @@ nsHttpConnection::MakeConnectString(nsAHttpTransaction *trans, request->SetHeader(nsHttp::Proxy_Connection, NS_LITERAL_CSTRING("keep-alive")); request->SetHeader(nsHttp::Connection, NS_LITERAL_CSTRING("keep-alive")); - const char *val = trans->RequestHead()->PeekHeader(nsHttp::Host); - if (val) { - // all HTTP/1.1 requests must include a Host header (even though it - // may seem redundant in this case; see bug 82388). - request->SetHeader(nsHttp::Host, nsDependentCString(val)); - } + // all HTTP/1.1 requests must include a Host header (even though it + // may seem redundant in this case; see bug 82388). + request->SetHeader(nsHttp::Host, result); - val = trans->RequestHead()->PeekHeader(nsHttp::Proxy_Authorization); + const char *val = trans->RequestHead()->PeekHeader(nsHttp::Proxy_Authorization); if (val) { // we don't know for sure if this authorization is intended for the // SSL proxy, so we add it just in case.