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
3 // found in the LICENSE file.
5 #ifndef NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_
6 #define NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_
11 #include "net/base/ip_endpoint.h"
15 // Meta information about an HTTP request.
16 // This is geared toward servers in that it keeps a map of the headers and
17 // values rather than just a list of header strings (which net::HttpRequestInfo
19 class HttpServerRequestInfo
{
21 HttpServerRequestInfo();
22 ~HttpServerRequestInfo();
24 // Returns header value for given header name. |header_name| should be
26 std::string
GetHeaderValue(const std::string
& header_name
) const;
28 // Checks for item in comma-separated header value for given header name.
29 // Both |header_name| and |header_value| should be lower case.
31 const std::string
& header_name
,
32 const std::string
& header_value
) const;
34 // Request peer address.
46 // A map of the names -> values for HTTP headers. These should always
47 // contain lower case field names.
48 typedef std::map
<std::string
, std::string
> HeadersMap
;
49 mutable HeadersMap headers
;
54 #endif // NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_