Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Side by Side Diff: net/server/http_server_request_info.h

Issue 251213004: HttpServer: avoid DCHECK'ing on non-HTTP/1.1 requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm spurious nl Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/server/http_server.cc ('k') | net/server/http_server_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "net/base/ip_endpoint.h" 11 #include "net/base/ip_endpoint.h"
12 #include "net/http/http_version.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 // Meta information about an HTTP request. 16 // Meta information about an HTTP request.
16 // This is geared toward servers in that it keeps a map of the headers and 17 // 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 18 // values rather than just a list of header strings (which net::HttpRequestInfo
18 // does). 19 // does).
19 class HttpServerRequestInfo { 20 class HttpServerRequestInfo {
20 public: 21 public:
21 HttpServerRequestInfo(); 22 HttpServerRequestInfo();
22 ~HttpServerRequestInfo(); 23 ~HttpServerRequestInfo();
23 24
24 // Returns header value for given header name. |header_name| should be 25 // Returns header value for given header name. |header_name| should be
25 // lower case. 26 // lower case.
26 std::string GetHeaderValue(const std::string& header_name) const; 27 std::string GetHeaderValue(const std::string& header_name) const;
27 28
28 // Request peer address. 29 // Request peer address.
29 IPEndPoint peer; 30 IPEndPoint peer;
30 31
32 // Request protocol/version
33 HttpVersion http_version;
34
31 // Request method. 35 // Request method.
32 std::string method; 36 std::string method;
33 37
34 // Request line. 38 // Request line.
35 std::string path; 39 std::string path;
36 40
37 // Request data. 41 // Request data.
38 std::string data; 42 std::string data;
39 43
40 // A map of the names -> values for HTTP headers. These should always 44 // A map of the names -> values for HTTP headers. These should always
41 // contain lower case field names. 45 // contain lower case field names.
42 typedef std::map<std::string, std::string> HeadersMap; 46 typedef std::map<std::string, std::string> HeadersMap;
43 mutable HeadersMap headers; 47 mutable HeadersMap headers;
44 }; 48 };
45 49
46 } // namespace net 50 } // namespace net
47 51
48 #endif // NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_ 52 #endif // NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_
OLDNEW
« no previous file with comments | « net/server/http_server.cc ('k') | net/server/http_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698