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" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/strings/string_piece.h" | 21 #include "base/strings/string_piece.h" |
22 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
23 #include "base/strings/stringprintf.h" | 23 #include "base/strings/stringprintf.h" |
24 #include "base/time/time.h" | 24 #include "base/time/time.h" |
25 #include "base/values.h" | 25 #include "base/values.h" |
26 #include "net/base/escape.h" | 26 #include "net/base/escape.h" |
27 #include "net/base/parse_number.h" | 27 #include "net/base/parse_number.h" |
28 #include "net/http/http_byte_range.h" | 28 #include "net/http/http_byte_range.h" |
29 #include "net/http/http_log_util.h" | 29 #include "net/http/http_log_util.h" |
30 #include "net/http/http_util.h" | 30 #include "net/http/http_util.h" |
| 31 #include "net/log/net_log_capture_mode.h" |
31 | 32 |
32 using base::StringPiece; | 33 using base::StringPiece; |
33 using base::Time; | 34 using base::Time; |
34 using base::TimeDelta; | 35 using base::TimeDelta; |
35 | 36 |
36 namespace net { | 37 namespace net { |
37 | 38 |
38 //----------------------------------------------------------------------------- | 39 //----------------------------------------------------------------------------- |
39 | 40 |
40 namespace { | 41 namespace { |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 return true; | 1468 return true; |
1468 } | 1469 } |
1469 | 1470 |
1470 bool HttpResponseHeaders::IsChunkEncoded() const { | 1471 bool HttpResponseHeaders::IsChunkEncoded() const { |
1471 // Ignore spurious chunked responses from HTTP/1.0 servers and proxies. | 1472 // Ignore spurious chunked responses from HTTP/1.0 servers and proxies. |
1472 return GetHttpVersion() >= HttpVersion(1, 1) && | 1473 return GetHttpVersion() >= HttpVersion(1, 1) && |
1473 HasHeaderValue("Transfer-Encoding", "chunked"); | 1474 HasHeaderValue("Transfer-Encoding", "chunked"); |
1474 } | 1475 } |
1475 | 1476 |
1476 } // namespace net | 1477 } // namespace net |
OLD | NEW |