From 3bafa52145ee466fc5899ed519ceccecb691487e Mon Sep 17 00:00:00 2001 From: "gunsch@chromium.org" Date: Wed, 30 Apr 2014 04:49:30 +0000 Subject: HttpServer: avoid DCHECK'ing on non-HTTP/1.1 requests. BUG=b/14249697 R=mef@chromium.org,byungchul@chromium.org Review URL: https://codereview.chromium.org/251213004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267066 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_util.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net/http/http_util.h') diff --git a/net/http/http_util.h b/net/http/http_util.h index ae65146..5ab27a6 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 -- cgit v1.1