| 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 header parsing were borrowed from Firefox: | 5 // The rules for header parsing were borrowed from Firefox: |
| 6 // http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpRespo
nseHead.cpp | 6 // http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpRespo
nseHead.cpp |
| 7 // The rules for parsing content-types were also borrowed from Firefox: | 7 // The rules for parsing content-types were also borrowed from Firefox: |
| 8 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834 | 8 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834 |
| 9 | 9 |
| 10 #include "net/http/http_response_headers.h" | 10 #include "net/http/http_response_headers.h" |
| 11 | 11 |
| 12 #include <algorithm> | 12 #include <algorithm> |
| 13 | 13 |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
| 16 #include "base/pickle.h" | 16 #include "base/pickle.h" |
| 17 #include "base/string_number_conversions.h" |
| 18 #include "base/string_util.h" |
| 17 #include "base/stringprintf.h" | 19 #include "base/stringprintf.h" |
| 18 #include "base/string_number_conversions.h" | 20 #include "base/strings/string_piece.h" |
| 19 #include "base/string_piece.h" | |
| 20 #include "base/string_util.h" | |
| 21 #include "base/time.h" | 21 #include "base/time.h" |
| 22 #include "base/values.h" | 22 #include "base/values.h" |
| 23 #include "net/base/escape.h" | 23 #include "net/base/escape.h" |
| 24 #include "net/http/http_util.h" | 24 #include "net/http/http_util.h" |
| 25 | 25 |
| 26 using base::StringPiece; | 26 using base::StringPiece; |
| 27 using base::Time; | 27 using base::Time; |
| 28 using base::TimeDelta; | 28 using base::TimeDelta; |
| 29 | 29 |
| 30 namespace net { | 30 namespace net { |
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 return true; | 1343 return true; |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 bool HttpResponseHeaders::IsChunkEncoded() const { | 1346 bool HttpResponseHeaders::IsChunkEncoded() const { |
| 1347 // Ignore spurious chunked responses from HTTP/1.0 servers and proxies. | 1347 // Ignore spurious chunked responses from HTTP/1.0 servers and proxies. |
| 1348 return GetHttpVersion() >= HttpVersion(1, 1) && | 1348 return GetHttpVersion() >= HttpVersion(1, 1) && |
| 1349 HasHeaderValue("Transfer-Encoding", "chunked"); | 1349 HasHeaderValue("Transfer-Encoding", "chunked"); |
| 1350 } | 1350 } |
| 1351 | 1351 |
| 1352 } // namespace net | 1352 } // namespace net |
| OLD | NEW |