Commit b178316f authored by bnc's avatar bnc Committed by Commit bot

Ignore persisent settings on SPDY4.

SpdySession::SendInitialData() now only retrieves and sends server-persisted
SPDY settings for SPDY/3.1 and below.

BUG=408348

Review URL: https://codereview.chromium.org/515353002

Cr-Commit-Position: refs/heads/master@{#292972}
parent 34ddd8e3
......@@ -2735,27 +2735,29 @@ void SpdySession::SendInitialData() {
kDefaultInitialRecvWindowSize - session_recv_window_size_);
}
// Finally, notify the server about the settings they have
// previously told us to use when communicating with them (after
// applying them).
const SettingsMap& server_settings_map =
http_server_properties_->GetSpdySettings(host_port_pair());
if (server_settings_map.empty())
return;
if (protocol_ <= kProtoSPDY31) {
// Finally, notify the server about the settings they have
// previously told us to use when communicating with them (after
// applying them).
const SettingsMap& server_settings_map =
http_server_properties_->GetSpdySettings(host_port_pair());
if (server_settings_map.empty())
return;
SettingsMap::const_iterator it =
server_settings_map.find(SETTINGS_CURRENT_CWND);
uint32 cwnd = (it != server_settings_map.end()) ? it->second.second : 0;
UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySettingsCwndSent", cwnd, 1, 200, 100);
SettingsMap::const_iterator it =
server_settings_map.find(SETTINGS_CURRENT_CWND);
uint32 cwnd = (it != server_settings_map.end()) ? it->second.second : 0;
UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySettingsCwndSent", cwnd, 1, 200, 100);
for (SettingsMap::const_iterator it = server_settings_map.begin();
it != server_settings_map.end(); ++it) {
const SpdySettingsIds new_id = it->first;
const uint32 new_val = it->second.second;
HandleSetting(new_id, new_val);
}
for (SettingsMap::const_iterator it = server_settings_map.begin();
it != server_settings_map.end(); ++it) {
const SpdySettingsIds new_id = it->first;
const uint32 new_val = it->second.second;
HandleSetting(new_id, new_val);
}
SendSettings(server_settings_map);
SendSettings(server_settings_map);
}
}
......
......@@ -1576,7 +1576,9 @@ TEST_P(SpdySessionTest, SendInitialDataOnNewSession) {
initial_max_concurrent_streams);
scoped_ptr<SpdyFrame> server_settings_frame(
spdy_util_.ConstructSpdySettings(server_settings));
writes.push_back(CreateMockWrite(*server_settings_frame));
if (GetParam() <= kProtoSPDY31) {
writes.push_back(CreateMockWrite(*server_settings_frame));
}
session_deps_.stream_initial_recv_window_size = kInitialRecvWindowSize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment