summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/nsHttpConnectionInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/protocol/http/nsHttpConnectionInfo.cpp')
-rw-r--r--netwerk/protocol/http/nsHttpConnectionInfo.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/netwerk/protocol/http/nsHttpConnectionInfo.cpp b/netwerk/protocol/http/nsHttpConnectionInfo.cpp
index e91128d85a..21c3e75b54 100644
--- a/netwerk/protocol/http/nsHttpConnectionInfo.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionInfo.cpp
@@ -258,6 +258,12 @@ void nsHttpConnectionInfo::BuildHashKey() {
}
}
+ if (mWebTransportId) {
+ mHashKey.AppendLiteral("{wId");
+ mHashKey.AppendInt(mWebTransportId, 16);
+ mHashKey.AppendLiteral("}");
+ }
+
nsAutoCString originAttributes;
mOriginAttributes.CreateSuffix(originAttributes);
mHashKey.Append(originAttributes);
@@ -326,6 +332,7 @@ already_AddRefed<nsHttpConnectionInfo> nsHttpConnectionInfo::Clone() const {
clone->SetIPv6Disabled(GetIPv6Disabled());
clone->SetHasIPHintAddress(HasIPHintAddress());
clone->SetEchConfig(GetEchConfig());
+ clone->SetWebTransportId(GetWebTransportId());
MOZ_ASSERT(clone->Equals(this));
return clone.forget();
@@ -418,6 +425,7 @@ void nsHttpConnectionInfo::SerializeHttpConnectionInfo(
aArgs.hasIPHintAddress() = aInfo->HasIPHintAddress();
aArgs.echConfig() = aInfo->GetEchConfig();
aArgs.webTransport() = aInfo->GetWebTransport();
+ aArgs.webTransportId() = aInfo->GetWebTransportId();
if (!aInfo->ProxyInfo()) {
return;
@@ -448,6 +456,8 @@ nsHttpConnectionInfo::DeserializeHttpConnectionInfoCloneArgs(
aInfoArgs.routedHost(), aInfoArgs.routedPort(), aInfoArgs.isHttp3(),
aInfoArgs.webTransport());
}
+ // Transfer Webtransport ids
+ cinfo->SetWebTransportId(aInfoArgs.webTransportId());
// Make sure the anonymous, insecure-scheme, and private flags are transferred
cinfo->SetAnonymous(aInfoArgs.anonymous());
@@ -542,6 +552,13 @@ void nsHttpConnectionInfo::SetWebTransport(bool aWebTransport) {
}
}
+void nsHttpConnectionInfo::SetWebTransportId(uint64_t id) {
+ if (mWebTransportId != id) {
+ mWebTransportId = id;
+ RebuildHashKey();
+ }
+}
+
void nsHttpConnectionInfo::SetTlsFlags(uint32_t aTlsFlags) {
mTlsFlags = aTlsFlags;
const uint32_t tlsFlagsLength = 8;