| 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_SERVER_HTTP_SERVER_REQUEST_INFO_H_ | 5 #ifndef NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_ |
| 6 #define NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_ | 6 #define NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 // Meta information about an HTTP request. | 14 // Meta information about an HTTP request. |
| 15 // This is geared toward servers in that it keeps a map of the headers and | 15 // This is geared toward servers in that it keeps a map of the headers and |
| 16 // values rather than just a list of header strings (which net::HttpRequestInfo | 16 // values rather than just a list of header strings (which net::HttpRequestInfo |
| 17 // does). | 17 // does). |
| 18 class HttpServerRequestInfo { | 18 class HttpServerRequestInfo { |
| 19 public: | 19 public: |
| 20 HttpServerRequestInfo(); | 20 HttpServerRequestInfo(); |
| 21 ~HttpServerRequestInfo(); | 21 ~HttpServerRequestInfo(); |
| 22 | 22 |
| 23 // Returns header value for given header name. |
| 24 std::string GetHeaderValue(const std::string& header_name) const; |
| 25 |
| 23 // Request method. | 26 // Request method. |
| 24 std::string method; | 27 std::string method; |
| 25 | 28 |
| 26 // Request line. | 29 // Request line. |
| 27 std::string path; | 30 std::string path; |
| 28 | 31 |
| 29 // Request data. | 32 // Request data. |
| 30 std::string data; | 33 std::string data; |
| 31 | 34 |
| 32 // A map of the names -> values for HTTP headers. | 35 // A map of the names -> values for HTTP headers. |
| 33 typedef std::map<std::string, std::string> HeadersMap; | 36 typedef std::map<std::string, std::string> HeadersMap; |
| 34 mutable HeadersMap headers; | 37 mutable HeadersMap headers; |
| 35 }; | 38 }; |
| 36 | 39 |
| 37 } // namespace net | 40 } // namespace net |
| 38 | 41 |
| 39 #endif // NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_ | 42 #endif // NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_ |
| OLD | NEW |