Skip to content

Commit f656bc0

Browse files
hanidamlajmeta-codesync[bot]
authored andcommitted
HQSession treat WT_ENABLED as ENABLE_WEBTRANSPORT
Summary: wt_enabled is the terminology seen in the draft currently i'll be removing the latter soon, but going ahead and making these two semantically equivalent until then Reviewed By: joanna-jo Differential Revision: D101231118 fbshipit-source-id: 4d6e9875f34c883a76930bf6a6c54904b2438d2d
1 parent 3e64ab9 commit f656bc0

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

proxygen/lib/http/session/HQSession.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -804,11 +804,11 @@ size_t HQSession::sendSettings() {
804804
case hq::SettingId::H3_DATAGRAM_RFC:
805805
case hq::SettingId::H3_WT_MAX_SESSIONS:
806806
case hq::SettingId::WT_INITIAL_MAX_DATA:
807-
case hq::SettingId::WT_ENABLED:
808807
break;
808+
case hq::SettingId::WT_ENABLED:
809809
case hq::SettingId::ENABLE_WEBTRANSPORT:
810810
if (setting.value) {
811-
VLOG(4) << "enable_webtransport sess=" << *this;
811+
VLOG(4) << "wt enabled sess=" << *this;
812812
supportsWebTransport_.set(
813813
folly::to_underlying(SettingEnabled::SELF));
814814
}
@@ -1574,8 +1574,9 @@ void HQSession::applySettings(const SettingsList& settings) {
15741574
case hq::SettingId::H3_DATAGRAM_RFC:
15751575
datagram = static_cast<bool>(setting.value);
15761576
break;
1577+
case hq::SettingId::WT_ENABLED:
15771578
case hq::SettingId::ENABLE_WEBTRANSPORT:
1578-
VLOG(3) << "Peer sent ENABLE_WEBTRANSPORT=" << setting.value;
1579+
VLOG(3) << "Peer sent WT_ENABLED=" << setting.value;
15791580
supportsWebTransport_.set(folly::to_underlying(SettingEnabled::PEER));
15801581
break;
15811582
case hq::SettingId::H3_WT_MAX_SESSIONS:
@@ -1586,11 +1587,6 @@ void HQSession::applySettings(const SettingsList& settings) {
15861587
VLOG(3) << "Peer sent WT_INITIAL_MAX_DATA=" << setting.value;
15871588
wtInitialSendWindow_ = setting.value;
15881589
break;
1589-
case hq::SettingId::WT_ENABLED:
1590-
// TODO: This part of the code needs a larger refactor. We shouldn't
1591-
// be setting supportsWebTransport_ unless: 1) WT_ENABLED =
1592-
// ENABLE_CONNECT_PROTOCOL = H3_DATAGRAM == 1 or 2) H3_DATAGRAM == 1
1593-
break;
15941590
}
15951591
}
15961592
}

proxygen/lib/http/session/test/HQSessionTestCommon.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class HQSessionTest
126126
egressSettings_.setSetting(proxygen::SettingsId::ENABLE_CONNECT_PROTOCOL,
127127
1);
128128
egressSettings_.setSetting(proxygen::SettingsId::ENABLE_WEBTRANSPORT, 1);
129+
egressSettings_.setSetting(proxygen::SettingsId::WT_ENABLED, 1);
129130
egressSettings_.setSetting(proxygen::SettingsId::WT_INITIAL_MAX_DATA,
130131
65536);
131132
}

0 commit comments

Comments
 (0)