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

Side by Side Diff: net/http/http_request_headers.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_response_headers.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/http/http_request_headers.h" 5 #include "net/http/http_request_headers.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 headers->AddHeaderFromString(header_line); 235 headers->AddHeaderFromString(header_line);
236 } 236 }
237 return true; 237 return true;
238 } 238 }
239 239
240 HttpRequestHeaders::HeaderVector::iterator 240 HttpRequestHeaders::HeaderVector::iterator
241 HttpRequestHeaders::FindHeader(const base::StringPiece& key) { 241 HttpRequestHeaders::FindHeader(const base::StringPiece& key) {
242 for (HeaderVector::iterator it = headers_.begin(); 242 for (HeaderVector::iterator it = headers_.begin();
243 it != headers_.end(); ++it) { 243 it != headers_.end(); ++it) {
244 if (key.length() == it->key.length() && 244 if (key.length() == it->key.length() &&
245 !base::strncasecmp(key.data(), it->key.data(), key.length())) 245 !strncasecmp(key.data(), it->key.data(), key.length()))
246 return it; 246 return it;
247 } 247 }
248 248
249 return headers_.end(); 249 return headers_.end();
250 } 250 }
251 251
252 HttpRequestHeaders::HeaderVector::const_iterator 252 HttpRequestHeaders::HeaderVector::const_iterator
253 HttpRequestHeaders::FindHeader(const base::StringPiece& key) const { 253 HttpRequestHeaders::FindHeader(const base::StringPiece& key) const {
254 for (HeaderVector::const_iterator it = headers_.begin(); 254 for (HeaderVector::const_iterator it = headers_.begin();
255 it != headers_.end(); ++it) { 255 it != headers_.end(); ++it) {
256 if (key.length() == it->key.length() && 256 if (key.length() == it->key.length() &&
257 !base::strncasecmp(key.data(), it->key.data(), key.length())) 257 !strncasecmp(key.data(), it->key.data(), key.length()))
258 return it; 258 return it;
259 } 259 }
260 260
261 return headers_.end(); 261 return headers_.end();
262 } 262 }
263 263
264 } // namespace net 264 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698