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

Unified Diff: net/http/http_util.h

Issue 251213004: HttpServer: avoid DCHECK'ing on non-HTTP/1.1 requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm spurious nl Created 6 years, 8 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_response_headers.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util.h
diff --git a/net/http/http_util.h b/net/http/http_util.h
index ae65146e6e4a42a21f673787d037f06330c9eb0b..5ab27a6c346c994a1a8e01064592117c67c233ce 100644
--- a/net/http/http_util.h
+++ b/net/http/http_util.h
@@ -40,6 +40,12 @@ class NET_EXPORT HttpUtil {
size_t search_start,
char delimiter);
+ // Parses an "HTTP/X.Y" version from a string, such as:
+ // "HTTP/1.1"
+ // Returns whether or not the version string was successfully parsed.
+ static bool ParseVersion(const std::string& version_str,
+ HttpVersion* version);
+
// Parses the value of a Content-Type header. The resulting mime_type and
// charset values are normalized to lowercase. The mime_type and charset
// output values are only modified if the content_type_str contains a mime
« no previous file with comments | « net/http/http_response_headers.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698