OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/string_split.h" | 8 #include "base/string_split.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "net/http/http_util.h" | 10 #include "net/http/http_util.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 const char HttpRequestHeaders::kHost[] = "Host"; | 23 const char HttpRequestHeaders::kHost[] = "Host"; |
24 const char HttpRequestHeaders::kIfModifiedSince[] = "If-Modified-Since"; | 24 const char HttpRequestHeaders::kIfModifiedSince[] = "If-Modified-Since"; |
25 const char HttpRequestHeaders::kIfNoneMatch[] = "If-None-Match"; | 25 const char HttpRequestHeaders::kIfNoneMatch[] = "If-None-Match"; |
26 const char HttpRequestHeaders::kIfRange[] = "If-Range"; | 26 const char HttpRequestHeaders::kIfRange[] = "If-Range"; |
27 const char HttpRequestHeaders::kOrigin[] = "Origin"; | 27 const char HttpRequestHeaders::kOrigin[] = "Origin"; |
28 const char HttpRequestHeaders::kPragma[] = "Pragma"; | 28 const char HttpRequestHeaders::kPragma[] = "Pragma"; |
29 const char HttpRequestHeaders::kProxyConnection[] = "Proxy-Connection"; | 29 const char HttpRequestHeaders::kProxyConnection[] = "Proxy-Connection"; |
30 const char HttpRequestHeaders::kRange[] = "Range"; | 30 const char HttpRequestHeaders::kRange[] = "Range"; |
31 const char HttpRequestHeaders::kReferer[] = "Referer"; | 31 const char HttpRequestHeaders::kReferer[] = "Referer"; |
32 const char HttpRequestHeaders::kUserAgent[] = "User-Agent"; | 32 const char HttpRequestHeaders::kUserAgent[] = "User-Agent"; |
| 33 const char HttpRequestHeaders::kTransferEncoding[] = "Transfer-Encoding"; |
33 | 34 |
34 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair() { | 35 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair() { |
35 } | 36 } |
36 | 37 |
37 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair( | 38 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair( |
38 const base::StringPiece& key, const base::StringPiece& value) | 39 const base::StringPiece& key, const base::StringPiece& value) |
39 : key(key.data(), key.size()), value(value.data(), value.size()) { | 40 : key(key.data(), key.size()), value(value.data(), value.size()) { |
40 } | 41 } |
41 | 42 |
42 | 43 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 it != headers_.end(); ++it) { | 197 it != headers_.end(); ++it) { |
197 if (key.length() == it->key.length() && | 198 if (key.length() == it->key.length() && |
198 !base::strncasecmp(key.data(), it->key.data(), key.length())) | 199 !base::strncasecmp(key.data(), it->key.data(), key.length())) |
199 return it; | 200 return it; |
200 } | 201 } |
201 | 202 |
202 return headers_.end(); | 203 return headers_.end(); |
203 } | 204 } |
204 | 205 |
205 } // namespace net | 206 } // namespace net |
OLD | NEW |