Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1295)

Unified Diff: net/quic/core/quic_config.cc

Issue 2512623002: Add connection option kSMHL indicating supporting SETTINGS_MAX_HEADER_LIST_SIZE. SETTINGS_MAX_HEADE… (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_config.h ('k') | net/quic/core/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_config.cc
diff --git a/net/quic/core/quic_config.cc b/net/quic/core/quic_config.cc
index 5a3bccbd90d2350fad5b4f509d6ddeae5c144e6f..05a21747295cbef94a82cee797da8621ed839d99 100644
--- a/net/quic/core/quic_config.cc
+++ b/net/quic/core/quic_config.cc
@@ -10,6 +10,7 @@
#include "net/quic/core/crypto/crypto_handshake_message.h"
#include "net/quic/core/crypto/crypto_protocol.h"
#include "net/quic/core/quic_bug_tracker.h"
+#include "net/quic/core/quic_flags.h"
#include "net/quic/core/quic_socket_address_coder.h"
#include "net/quic/core/quic_utils.h"
@@ -423,7 +424,8 @@ QuicConfig::QuicConfig()
multipath_enabled_(kMPTH, PRESENCE_OPTIONAL),
connection_migration_disabled_(kNCMR, PRESENCE_OPTIONAL),
alternate_server_address_(kASAD, PRESENCE_OPTIONAL),
- force_hol_blocking_(kFHL2, PRESENCE_OPTIONAL) {
+ force_hol_blocking_(kFHL2, PRESENCE_OPTIONAL),
+ support_max_header_list_size_(kSMHL, PRESENCE_OPTIONAL) {
SetDefaults();
}
@@ -661,6 +663,14 @@ bool QuicConfig::ForceHolBlocking(Perspective perspective) const {
}
}
+void QuicConfig::SetSupportMaxHeaderListSize() {
+ support_max_header_list_size_.SetSendValue(1);
+}
+
+bool QuicConfig::SupportMaxHeaderListSize() const {
+ return support_max_header_list_size_.HasReceivedValue();
+}
+
bool QuicConfig::negotiated() const {
// TODO(ianswett): Add the negotiated parameters once and iterate over all
// of them in negotiated, ToHandshakeMessage, ProcessClientHello, and
@@ -684,6 +694,9 @@ void QuicConfig::SetDefaults() {
SetInitialStreamFlowControlWindowToSend(kMinimumFlowControlSendWindow);
SetInitialSessionFlowControlWindowToSend(kMinimumFlowControlSendWindow);
+ if (FLAGS_quic_send_max_header_list_size) {
+ SetSupportMaxHeaderListSize();
+ }
}
void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const {
@@ -700,6 +713,7 @@ void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const {
connection_options_.ToHandshakeMessage(out);
alternate_server_address_.ToHandshakeMessage(out);
force_hol_blocking_.ToHandshakeMessage(out);
+ support_max_header_list_size_.ToHandshakeMessage(out);
}
QuicErrorCode QuicConfig::ProcessPeerHello(
@@ -761,6 +775,10 @@ QuicErrorCode QuicConfig::ProcessPeerHello(
error = force_hol_blocking_.ProcessPeerHello(peer_hello, hello_type,
error_details);
}
+ if (error == QUIC_NO_ERROR) {
+ error = support_max_header_list_size_.ProcessPeerHello(
+ peer_hello, hello_type, error_details);
+ }
return error;
}
« no previous file with comments | « net/quic/core/quic_config.h ('k') | net/quic/core/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698