summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/Http2Session.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-11-19 18:19:29 +0000
committerMoonchild <moonchild@palemoon.org>2020-11-19 22:46:51 +0000
commit2219a336dd994d50f439bdb6e3b9b3fece776014 (patch)
tree77736fdf9e4f18dd7b7b5b7560977710de7ded02 /netwerk/protocol/http/Http2Session.cpp
parenta6763e74514d611ad3d768d7528fbd88dc0f2694 (diff)
downloadUXP-2219a336dd994d50f439bdb6e3b9b3fece776014.tar
UXP-2219a336dd994d50f439bdb6e3b9b3fece776014.tar.gz
UXP-2219a336dd994d50f439bdb6e3b9b3fece776014.tar.lz
UXP-2219a336dd994d50f439bdb6e3b9b3fece776014.tar.xz
UXP-2219a336dd994d50f439bdb6e3b9b3fece776014.zip
[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.
Diffstat (limited to 'netwerk/protocol/http/Http2Session.cpp')
-rw-r--r--netwerk/protocol/http/Http2Session.cpp9
1 files changed, 5 insertions, 4 deletions
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<nsHttpConnectionInfo> clone(ci->Clone());
RefPtr<SpdyConnectTransaction> 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);