diff --git a/netwerk/protocol/http/HttpChannelParentListener.cpp b/netwerk/protocol/http/HttpChannelParentListener.cpp index 24551b4a6bb..380620a6bb9 100644 --- a/netwerk/protocol/http/HttpChannelParentListener.cpp +++ b/netwerk/protocol/http/HttpChannelParentListener.cpp @@ -220,11 +220,14 @@ HttpChannelParentListener::AsyncOnChannelRedirect( newChannel->GetURI(getter_AddRefs(newURI)); nsHttpChannel *oldHttpChannel = static_cast(oldChannel); + nsHttpResponseHead *responseHead = oldHttpChannel->GetResponseHead(); + // TODO: check mActiveChannel->mIPCClosed and return val from Send function mActiveChannel->SendRedirect1Begin(mRedirectChannel, IPC::URI(newURI), redirectFlags, - *oldHttpChannel->GetResponseHead()); + responseHead ? *responseHead + : nsHttpResponseHead()); // mActiveChannel gets the response in RecvRedirect2Result and forwards it // to this wrapper through OnContentRedirectResultReceived