Commit 11ba7b9d authored by bnc's avatar bnc Committed by Commit bot

Do not re-add alternate protocol in SetBrokenAlternateProtocol.

Do not re-add alternate protocol from canonical host to origin in
HttpServerPropertiesImpl::SetBrokenAlternateProtocol(), because brokenness is
recorded independently of the alternate protocol mapping.  I have overlooked
this detail in
https://crrev.com/997953003/diff/80001/net/http/http_server_properties_impl.cc.

BUG=392576

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

Cr-Commit-Position: refs/heads/master@{#320897}
parent eead91c0
......@@ -307,17 +307,10 @@ void HttpServerPropertiesImpl::SetAlternateProtocol(
void HttpServerPropertiesImpl::SetBrokenAlternateProtocol(
const HostPortPair& server) {
AlternateProtocolMap::iterator it = alternate_protocol_map_.Get(server);
const AlternateProtocolInfo alternate = GetAlternateProtocol(server);
if (it == alternate_protocol_map_.end()) {
if (alternate.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL) {
LOG(DFATAL) << "Trying to mark unknown alternate protocol broken.";
return;
}
// This server's alternate protocol information is coming from a canonical
// server. Add an entry in the map for this server explicitly so that
// it can be marked as broken.
it = alternate_protocol_map_.Put(server, alternate);
if (alternate.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL) {
LOG(DFATAL) << "Trying to mark unknown alternate protocol broken.";
return;
}
const AlternativeService alternative_service(alternate.protocol,
server.host(), alternate.port);
......
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