OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 5 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 26 matching lines...) Expand all Loading... |
37 static const PersistOptions PERSIST_SANS_HOP_BY_HOP = 1 << 2; | 37 static const PersistOptions PERSIST_SANS_HOP_BY_HOP = 1 << 2; |
38 static const PersistOptions PERSIST_SANS_NON_CACHEABLE = 1 << 3; | 38 static const PersistOptions PERSIST_SANS_NON_CACHEABLE = 1 << 3; |
39 static const PersistOptions PERSIST_SANS_RANGES = 1 << 4; | 39 static const PersistOptions PERSIST_SANS_RANGES = 1 << 4; |
40 | 40 |
41 // Parses the given raw_headers. raw_headers should be formatted thus: | 41 // Parses the given raw_headers. raw_headers should be formatted thus: |
42 // includes the http status response line, each line is \0-terminated, and | 42 // includes the http status response line, each line is \0-terminated, and |
43 // it's terminated by an empty line (ie, 2 \0s in a row). | 43 // it's terminated by an empty line (ie, 2 \0s in a row). |
44 // (Note that line continuations should have already been joined; | 44 // (Note that line continuations should have already been joined; |
45 // see HttpUtil::AssembleRawHeaders) | 45 // see HttpUtil::AssembleRawHeaders) |
46 // | 46 // |
47 // NOTE: For now, raw_headers is not really 'raw' in that this constructor is | |
48 // called with a 'NativeMB' string on Windows because WinHTTP does not allow | |
49 // us to access the raw byte sequence as sent by a web server. In any case, | |
50 // HttpResponseHeaders does not perform any encoding changes on the input. | 47 // HttpResponseHeaders does not perform any encoding changes on the input. |
51 // | 48 // |
52 explicit HttpResponseHeaders(const std::string& raw_headers); | 49 explicit HttpResponseHeaders(const std::string& raw_headers); |
53 | 50 |
54 // Initializes from the representation stored in the given pickle. The data | 51 // Initializes from the representation stored in the given pickle. The data |
55 // for this object is found relative to the given pickle_iter, which should | 52 // for this object is found relative to the given pickle_iter, which should |
56 // be passed to the pickle's various Read* methods. | 53 // be passed to the pickle's various Read* methods. |
57 HttpResponseHeaders(const Pickle& pickle, void** pickle_iter); | 54 HttpResponseHeaders(const Pickle& pickle, void** pickle_iter); |
58 | 55 |
59 // Appends a representation of this object to the given pickle. | 56 // Appends a representation of this object to the given pickle. |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 338 |
342 // The parsed http version number (not normalized). | 339 // The parsed http version number (not normalized). |
343 HttpVersion parsed_http_version_; | 340 HttpVersion parsed_http_version_; |
344 | 341 |
345 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); | 342 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
346 }; | 343 }; |
347 | 344 |
348 } // namespace net | 345 } // namespace net |
349 | 346 |
350 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 347 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
OLD | NEW |