Fixed bug 37347. HTTP HEAD requests should work now.
git-svn-id: svn://10.0.0.236/trunk@68946 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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<nsIAtom> 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.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user