diff --git a/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp b/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp index c9e2efde915..4d9a5152883 100644 --- a/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp @@ -1336,7 +1336,8 @@ nsHTTPChannel::Open(PRBool bIgnoreCache) getter_Copies(authStr)))) { if (authStr && *authStr) - rv = mRequest->SetHeader(nsHTTPAtoms::Authorization, authStr); + rv = mRequest->SetHeader(nsHTTPAtoms::Authorization, + authStr); } if (mProxy && *mProxy) @@ -1344,10 +1345,11 @@ nsHTTPChannel::Open(PRBool bIgnoreCache) nsXPIDLCString proxyAuthStr; if (NS_SUCCEEDED(pAuthEngine->GetProxyAuthString(mProxy, mProxyPort, - getter_Copies(proxyAuthStr)))) + getter_Copies(proxyAuthStr)))) { if (proxyAuthStr && *proxyAuthStr) - rv = mRequest->SetHeader(nsHTTPAtoms::Proxy_Authorization, + rv = mRequest->SetHeader( + nsHTTPAtoms::Proxy_Authorization, proxyAuthStr); } } @@ -1859,6 +1861,11 @@ nsHTTPChannel::FinishedResponseHeaders(void) OnHeadersAvailable(); mFiredOnHeadersAvailable = PR_TRUE; + // if its a head request dont call processStatusCode but wrap up instead + nsCOMPtr method = mRequest->GetMethod(); + if (method.get() == nsHTTPAtoms::Head) + return ResponseCompleted(mResponseDataListener, NS_OK, nsnull); + // // Check the status code to see if any special processing is necessary. //