diff --git a/netwerk/protocol/http/src/nsHttpChannel.cpp b/netwerk/protocol/http/src/nsHttpChannel.cpp index 97ec100e8c48..637fa682df3e 100644 --- a/netwerk/protocol/http/src/nsHttpChannel.cpp +++ b/netwerk/protocol/http/src/nsHttpChannel.cpp @@ -202,12 +202,8 @@ nsHttpChannel::Init(nsIURI *uri, AddStandardRequestHeaders(&mRequestHead.Headers(), caps, !mConnectionInfo->UsingSSL() && mConnectionInfo->UsingHttpProxy()); - if (NS_FAILED(rv)) return rv; - // check to see if authorization headers should be included - AddAuthorizationHeaders(); - - return NS_OK; + return rv; } //----------------------------------------------------------------------------- @@ -327,6 +323,9 @@ nsHttpChannel::Connect(PRBool firstTime) } } + // check to see if authorization headers should be included + AddAuthorizationHeaders(); + // hit the net... rv = SetupTransaction(); if (NS_FAILED(rv)) return rv;