OLD | NEW |
1 // Copyright (c) 2009 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 #ifndef NET_HTTP_HTTP_RESPONSE_INFO_H__ | 5 #ifndef NET_HTTP_HTTP_RESPONSE_INFO_H_ |
6 #define NET_HTTP_HTTP_RESPONSE_INFO_H__ | 6 #define NET_HTTP_HTTP_RESPONSE_INFO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include <map> |
9 #include <string> | 10 #include <string> |
10 #include <map> | |
11 | 11 |
12 // Meta information about a server response. | 12 // Meta information about a server response. |
13 class HttpServerResponseInfo { | 13 class HttpServerResponseInfo { |
14 public: | 14 public: |
15 HttpServerResponseInfo() | 15 HttpServerResponseInfo() |
16 : status(200), content_length(0), connection_close(false) { | 16 : status(200), content_length(0), connection_close(false) { |
17 } | 17 } |
18 | 18 |
19 // The response protocol | 19 // The response protocol. |
20 std::string protocol; | 20 std::string protocol; |
21 | 21 |
22 // The status code | 22 // The status code. |
23 int status; | 23 int status; |
24 | 24 |
25 // The server identifier | 25 // The server identifier. |
26 std::string server_name; | 26 std::string server_name; |
27 | 27 |
28 // The content type | 28 // The content type. |
29 std::string content_type; | 29 std::string content_type; |
30 | 30 |
31 // The content length | 31 // The content length. |
32 int content_length; | 32 int content_length; |
33 | 33 |
34 // Should we close the connection | 34 // Should we close the connection. |
35 bool connection_close; | 35 bool connection_close; |
36 | 36 |
37 // Additional response headers | 37 // Additional response headers. |
38 std::map<std::string, std::string> headers; | 38 std::map<std::string, std::string> headers; |
39 }; | 39 }; |
40 | 40 |
41 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H__ | 41 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ |
OLD | NEW |