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

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: Response to comments 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
« no previous file with comments | « net/http/http_basic_state.h ('k') | net/http/http_basic_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..598b0d97913da2658d30bb5e5c525dc3e5c679b4 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));
+ parser_->set_http_09_on_non_default_ports_enabled(
+ http_09_on_non_default_ports_enabled_);
return OK;
}
« no previous file with comments | « net/http/http_basic_state.h ('k') | net/http/http_basic_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698