| 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" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 const char HttpRequestHeaders::kGetMethod[] = "GET"; | 14 const char HttpRequestHeaders::kGetMethod[] = "GET"; |
| 15 const char HttpRequestHeaders::kAcceptCharset[] = "Accept-Charset"; | 15 const char HttpRequestHeaders::kAcceptCharset[] = "Accept-Charset"; |
| 16 const char HttpRequestHeaders::kAcceptEncoding[] = "Accept-Encoding"; | 16 const char HttpRequestHeaders::kAcceptEncoding[] = "Accept-Encoding"; |
| 17 const char HttpRequestHeaders::kAcceptLanguage[] = "Accept-Language"; | 17 const char HttpRequestHeaders::kAcceptLanguage[] = "Accept-Language"; |
| 18 const char HttpRequestHeaders::kCacheControl[] = "Cache-Control"; | 18 const char HttpRequestHeaders::kCacheControl[] = "Cache-Control"; |
| 19 const char HttpRequestHeaders::kConnection[] = "Connection"; | 19 const char HttpRequestHeaders::kConnection[] = "Connection"; |
| 20 const char HttpRequestHeaders::kContentLength[] = "Content-Length"; | 20 const char HttpRequestHeaders::kContentLength[] = "Content-Length"; |
| 21 const char HttpRequestHeaders::kContentType[] = "Content-Type"; | 21 const char HttpRequestHeaders::kContentType[] = "Content-Type"; |
| 22 const char HttpRequestHeaders::kCookie[] = "Cookie"; | 22 const char HttpRequestHeaders::kCookie[] = "Cookie"; |
| 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::kOriginCookie[] = "Origin-Cookie"; |
| 28 const char HttpRequestHeaders::kPragma[] = "Pragma"; | 29 const char HttpRequestHeaders::kPragma[] = "Pragma"; |
| 29 const char HttpRequestHeaders::kProxyConnection[] = "Proxy-Connection"; | 30 const char HttpRequestHeaders::kProxyConnection[] = "Proxy-Connection"; |
| 30 const char HttpRequestHeaders::kRange[] = "Range"; | 31 const char HttpRequestHeaders::kRange[] = "Range"; |
| 31 const char HttpRequestHeaders::kReferer[] = "Referer"; | 32 const char HttpRequestHeaders::kReferer[] = "Referer"; |
| 32 const char HttpRequestHeaders::kUserAgent[] = "User-Agent"; | 33 const char HttpRequestHeaders::kUserAgent[] = "User-Agent"; |
| 33 | 34 |
| 34 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair() { | 35 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair() { |
| 35 } | 36 } |
| 36 | 37 |
| 37 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair( | 38 HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair( |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 it != headers_.end(); ++it) { | 188 it != headers_.end(); ++it) { |
| 188 if (key.length() == it->key.length() && | 189 if (key.length() == it->key.length() && |
| 189 !base::strncasecmp(key.data(), it->key.data(), key.length())) | 190 !base::strncasecmp(key.data(), it->key.data(), key.length())) |
| 190 return it; | 191 return it; |
| 191 } | 192 } |
| 192 | 193 |
| 193 return headers_.end(); | 194 return headers_.end(); |
| 194 } | 195 } |
| 195 | 196 |
| 196 } // namespace net | 197 } // namespace net |
| OLD | NEW |