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

Unified Diff: net/http/http_stream_parser.h

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_stream_parser.h
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h
index a70af6560fd0b283397c7916d2fc44236ba0926e..89d6baf6e033f9e75d37618494e47acbcff5d79f 100644
--- a/net/http/http_stream_parser.h
+++ b/net/http/http_stream_parser.h
@@ -50,6 +50,12 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
const BoundNetLog& net_log);
virtual ~HttpStreamParser();
+ // By default, HTTP/0.9 is only allowed on default ports. This enables it
+ // everwhere.
+ void set_http_09_on_non_default_ports_enabled() {
eroman 2016/08/29 22:11:55 I think this would be clearer if it took a boolean
mmenke 2016/08/30 17:50:47 Done. I didn't make it take a bool to emphasize i
+ http_09_on_non_default_ports_enabled_ = true;
+ }
+
// These functions implement the interface described in HttpStream with
// some additional functionality
int SendRequest(const std::string& request_line,
@@ -209,6 +215,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_;

Powered by Google App Engine
This is Rietveld 408576698