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

Unified Diff: net/http/http_basic_state.cc

Issue 2253653002: Only allow HTTP/0.9 support on default ports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unrelated changes to random file (Where did they come from???) Created 4 years, 4 months 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
Index: net/http/http_basic_state.cc
diff --git a/net/http/http_basic_state.cc b/net/http/http_basic_state.cc
index ceadb5761eba00ff916a53972d5303e6f4030f96..e26ff736307fb0ba23e6ff5ce71fbb43ac441a1e 100644
--- a/net/http/http_basic_state.cc
+++ b/net/http/http_basic_state.cc
@@ -18,11 +18,14 @@
namespace net {
HttpBasicState::HttpBasicState(std::unique_ptr<ClientSocketHandle> connection,
- bool using_proxy)
+ bool using_proxy,
+ bool http_09_on_non_default_ports_enabled)
: read_buf_(new GrowableIOBuffer()),
connection_(std::move(connection)),
using_proxy_(using_proxy),
- request_info_(NULL) {}
+ http_09_on_non_default_ports_enabled_(
+ http_09_on_non_default_ports_enabled),
+ request_info_(nullptr) {}
HttpBasicState::~HttpBasicState() {}
@@ -34,6 +37,8 @@ int HttpBasicState::Initialize(const HttpRequestInfo* request_info,
request_info_ = request_info;
parser_.reset(new HttpStreamParser(
connection_.get(), request_info, read_buf_.get(), net_log));
+ if (http_09_on_non_default_ports_enabled_)
+ parser_->set_http_09_on_non_default_ports_enabled();
return OK;
}

Powered by Google App Engine
This is Rietveld 408576698