From 2219a336dd994d50f439bdb6e3b9b3fece776014 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 19 Nov 2020 18:19:29 +0000 Subject: [http] Use a copy of nsHttpConnectionInfo. The root cause in this bug is that the connection info used by 'SpdyConnectTransaction' is the same instance as the connection info in 'nsHttpTransaction', so we should clone it and let 'SpdyConnectTransaction' use the cloned one. --- netwerk/protocol/http/Http2Session.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'netwerk/protocol/http/Http2Session.cpp') diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp index 726b39f74..3dc79c854 100644 --- a/netwerk/protocol/http/Http2Session.cpp +++ b/netwerk/protocol/http/Http2Session.cpp @@ -3532,17 +3532,18 @@ Http2Session::UnRegisterTunnel(Http2Stream *aTunnel) } void -Http2Session::CreateTunnel(nsHttpTransaction *trans, - nsHttpConnectionInfo *ci, - nsIInterfaceRequestor *aCallbacks) +Http2Session::CreateTunnel(nsHttpTransaction* trans, + nsHttpConnectionInfo* ci, + nsIInterfaceRequestor* aCallbacks) { LOG(("Http2Session::CreateTunnel %p %p make new tunnel\n", this, trans)); // The connect transaction will hold onto the underlying http // transaction so that an auth created by the connect can be mappped // to the correct security callbacks + RefPtr clone(ci->Clone()); RefPtr connectTrans = - new SpdyConnectTransaction(ci, aCallbacks, trans->Caps(), trans, this); + new SpdyConnectTransaction(clone, aCallbacks, trans->Caps(), trans, this); AddStream(connectTrans, nsISupportsPriority::PRIORITY_NORMAL, false, nullptr); Http2Stream *tunnel = mStreamTransactionHash.Get(connectTrans); MOZ_ASSERT(tunnel); -- cgit v1.2.3