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

Unified Diff: net/http/http_stream_parser.h

Issue 2299703003: Re-land: Only allow HTTP/0.9 support on default ports. (Closed)
Patch Set: Fix test 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_stream_factory_impl_job_controller_unittest.cc ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_parser.h
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h
index a70af6560fd0b283397c7916d2fc44236ba0926e..f5dbd0d564c012cd2f68b9976d15c91dcef7dafb 100644
--- a/net/http/http_stream_parser.h
+++ b/net/http/http_stream_parser.h
@@ -50,6 +50,14 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
const BoundNetLog& net_log);
virtual ~HttpStreamParser();
+ // Sets whether or not HTTP/0.9 is only allowed on default ports. It's not
+ // allowed, by default.
+ void set_http_09_on_non_default_ports_enabled(
+ bool http_09_on_non_default_ports_enabled) {
+ http_09_on_non_default_ports_enabled_ =
+ http_09_on_non_default_ports_enabled;
+ }
+
// These functions implement the interface described in HttpStream with
// some additional functionality
int SendRequest(const std::string& request_line,
@@ -209,6 +217,9 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
// |request_headers_| if the body was merged with the headers.
int request_headers_length_;
+ // True if HTTP/0.9 should be permitted on non-default ports.
+ bool http_09_on_non_default_ports_enabled_;
+
// Temporary buffer for reading.
scoped_refptr<GrowableIOBuffer> read_buf_;
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller_unittest.cc ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698