OLD | NEW |
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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 const char HttpRequestHeaders::kHost[] = "Host"; | 29 const char HttpRequestHeaders::kHost[] = "Host"; |
30 const char HttpRequestHeaders::kIfModifiedSince[] = "If-Modified-Since"; | 30 const char HttpRequestHeaders::kIfModifiedSince[] = "If-Modified-Since"; |
31 const char HttpRequestHeaders::kIfNoneMatch[] = "If-None-Match"; | 31 const char HttpRequestHeaders::kIfNoneMatch[] = "If-None-Match"; |
32 const char HttpRequestHeaders::kIfRange[] = "If-Range"; | 32 const char HttpRequestHeaders::kIfRange[] = "If-Range"; |
33 const char HttpRequestHeaders::kOrigin[] = "Origin"; | 33 const char HttpRequestHeaders::kOrigin[] = "Origin"; |
34 const char HttpRequestHeaders::kPragma[] = "Pragma"; | 34 const char HttpRequestHeaders::kPragma[] = "Pragma"; |
35 const char HttpRequestHeaders::kProxyAuthorization[] = "Proxy-Authorization"; | 35 const char HttpRequestHeaders::kProxyAuthorization[] = "Proxy-Authorization"; |
36 const char HttpRequestHeaders::kProxyConnection[] = "Proxy-Connection"; | 36 const char HttpRequestHeaders::kProxyConnection[] = "Proxy-Connection"; |
37 const char HttpRequestHeaders::kRange[] = "Range"; | 37 const char HttpRequestHeaders::kRange[] = "Range"; |
38 const char HttpRequestHeaders::kReferer[] = "Referer"; | 38 const char HttpRequestHeaders::kReferer[] = "Referer"; |
| 39 const char HttpRequestHeaders::kTransferEncoding[] = "Transfer-Encoding"; |
| 40 const char HttpRequestHeaders::kTokenBinding[] = "Token-Binding"; |
39 const char HttpRequestHeaders::kUserAgent[] = "User-Agent"; | 41 const char HttpRequestHeaders::kUserAgent[] = "User-Agent"; |
40 const char HttpRequestHeaders::kTransferEncoding[] = "Transfer-Encoding"; | |
41 | 42 |
42 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair() { | 43 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair() { |
43 } | 44 } |
44 | 45 |
45 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair( | 46 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair( |
46 const base::StringPiece& key, const base::StringPiece& value) | 47 const base::StringPiece& key, const base::StringPiece& value) |
47 : key(key.data(), key.size()), value(value.data(), value.size()) { | 48 : key(key.data(), key.size()), value(value.data(), value.size()) { |
48 } | 49 } |
49 | 50 |
50 | 51 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 for (HeaderVector::const_iterator it = headers_.begin(); | 250 for (HeaderVector::const_iterator it = headers_.begin(); |
250 it != headers_.end(); ++it) { | 251 it != headers_.end(); ++it) { |
251 if (base::EqualsCaseInsensitiveASCII(key, it->key)) | 252 if (base::EqualsCaseInsensitiveASCII(key, it->key)) |
252 return it; | 253 return it; |
253 } | 254 } |
254 | 255 |
255 return headers_.end(); | 256 return headers_.end(); |
256 } | 257 } |
257 | 258 |
258 } // namespace net | 259 } // namespace net |
OLD | NEW |