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

Unified Diff: net/spdy/spdy_http_utils.cc

Issue 1561203003: Remove SPDY/2 code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #3. Created 4 years, 11 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/spdy/spdy_headers_block_parser_test.cc ('k') | net/spdy/spdy_http_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_http_utils.cc
diff --git a/net/spdy/spdy_http_utils.cc b/net/spdy/spdy_http_utils.cc
index af55ac427e42708b3dfffc1b5e3ac74b4241d2fc..8692305bf56f4ec342e1e13e7b0f3408aecf6dd0 100644
--- a/net/spdy/spdy_http_utils.cc
+++ b/net/spdy/spdy_http_utils.cc
@@ -84,7 +84,7 @@ bool SpdyHeadersToHttpResponse(const SpdyHeaderBlock& headers,
tval = value.substr(start, (end - start));
else
tval = value.substr(start);
- if (protocol_version >= 3 && it->first[0] == ':')
+ if (it->first[0] == ':')
raw_headers.append(it->first.as_string().substr(1));
else
raw_headers.append(it->first.as_string());
@@ -107,19 +107,6 @@ void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info,
SpdyHeaderBlock* headers) {
static const char kHttpProtocolVersion[] = "HTTP/1.1";
switch (protocol_version) {
- case SPDY2:
- // TODO(bnc): Remove this code now that SPDY/2 is deprecated.
- (*headers)["version"] = kHttpProtocolVersion;
- (*headers)["method"] = info.method;
- (*headers)["host"] = GetHostAndOptionalPort(info.url);
- if (info.method == "CONNECT") {
- (*headers)["url"] = GetHostAndPort(info.url);
- } else {
- (*headers)["scheme"] = info.url.scheme();
- (*headers)["url"] = direct ? info.url.PathForRequest()
- : HttpUtil::SpecForRequest(info.url);
- }
- break;
case SPDY3:
(*headers)[":version"] = kHttpProtocolVersion;
(*headers)[":method"] = info.method;
« no previous file with comments | « net/spdy/spdy_headers_block_parser_test.cc ('k') | net/spdy/spdy_http_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698