| 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 // The rules for parsing content-types were borrowed from Firefox: | 5 // The rules for parsing content-types were borrowed from Firefox: |
| 6 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834 | 6 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834 |
| 7 | 7 |
| 8 #include "net/http/http_util.h" | 8 #include "net/http/http_util.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 return stripped_headers; | 400 return stripped_headers; |
| 401 } | 401 } |
| 402 | 402 |
| 403 // static | 403 // static |
| 404 bool HttpUtil::IsNonCoalescingHeader(std::string::const_iterator name_begin, | 404 bool HttpUtil::IsNonCoalescingHeader(std::string::const_iterator name_begin, |
| 405 std::string::const_iterator name_end) { | 405 std::string::const_iterator name_end) { |
| 406 // NOTE: "set-cookie2" headers do not support expires attributes, so we don't | 406 // NOTE: "set-cookie2" headers do not support expires attributes, so we don't |
| 407 // have to list them here. | 407 // have to list them here. |
| 408 const char* kNonCoalescingHeaders[] = { | 408 const char* const kNonCoalescingHeaders[] = { |
| 409 "date", | 409 "date", |
| 410 "expires", | 410 "expires", |
| 411 "last-modified", | 411 "last-modified", |
| 412 "location", // See bug 1050541 for details | 412 "location", // See bug 1050541 for details |
| 413 "retry-after", | 413 "retry-after", |
| 414 "set-cookie", | 414 "set-cookie", |
| 415 // The format of auth-challenges mixes both space separated tokens and | 415 // The format of auth-challenges mixes both space separated tokens and |
| 416 // comma separated properties, so coalescing on comma won't work. | 416 // comma separated properties, so coalescing on comma won't work. |
| 417 "www-authenticate", | 417 "www-authenticate", |
| 418 "proxy-authenticate", | 418 "proxy-authenticate", |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 value_is_quoted_ = true; | 934 value_is_quoted_ = true; |
| 935 // Do not store iterators into this. See declaration of unquoted_value_. | 935 // Do not store iterators into this. See declaration of unquoted_value_. |
| 936 unquoted_value_ = HttpUtil::Unquote(value_begin_, value_end_); | 936 unquoted_value_ = HttpUtil::Unquote(value_begin_, value_end_); |
| 937 } | 937 } |
| 938 } | 938 } |
| 939 | 939 |
| 940 return true; | 940 return true; |
| 941 } | 941 } |
| 942 | 942 |
| 943 } // namespace net | 943 } // namespace net |
| OLD | NEW |