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

Side by Side Diff: net/quic/core/spdy_utils.cc

Issue 2470353002: Remove any use of BalsaHeaders and HttpMessage from QuicTestClient. (Closed)
Patch Set: Fix Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/core/spdy_utils_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/spdy_utils.h" 5 #include "net/quic/core/spdy_utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 SpdyHeaderBlock* headers) { 244 SpdyHeaderBlock* headers) {
245 (*headers)[":method"] = "GET"; 245 (*headers)[":method"] = "GET";
246 size_t pos = url.find("://"); 246 size_t pos = url.find("://");
247 if (pos == string::npos) { 247 if (pos == string::npos) {
248 return false; 248 return false;
249 } 249 }
250 (*headers)[":scheme"] = url.substr(0, pos); 250 (*headers)[":scheme"] = url.substr(0, pos);
251 size_t start = pos + 3; 251 size_t start = pos + 3;
252 pos = url.find("/", start); 252 pos = url.find("/", start);
253 if (pos == string::npos) { 253 if (pos == string::npos) {
254 return false; 254 (*headers)[":authority"] = url.substr(start);
255 (*headers)[":path"] = "/";
256 return true;
255 } 257 }
256 (*headers)[":authority"] = url.substr(start, pos - start); 258 (*headers)[":authority"] = url.substr(start, pos - start);
257 (*headers)[":path"] = url.substr(pos); 259 (*headers)[":path"] = url.substr(pos);
258 return true; 260 return true;
259 } 261 }
260 262
261 } // namespace net 263 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/spdy_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698