Home | History | Annotate | Download | only in server
      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.
      4 
      5 #ifndef NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_
      6 #define NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_
      7 #pragma once
      8 
      9 #include <map>
     10 #include <string>
     11 
     12 namespace net {
     13 
     14 // Meta information about an HTTP request.
     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
     17 // does).
     18 class HttpServerRequestInfo {
     19  public:
     20   HttpServerRequestInfo();
     21   ~HttpServerRequestInfo();
     22 
     23   // Request method.
     24   std::string method;
     25 
     26   // Request line.
     27   std::string path;
     28 
     29   // Request data.
     30   std::string data;
     31 
     32   // A map of the names -> values for HTTP headers.
     33   typedef std::map<std::string, std::string> HeadersMap;
     34   mutable HeadersMap headers;
     35 };
     36 
     37 }  // namespace net
     38 
     39 #endif  // NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_
     40