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

Side by Side Diff: net/test/embedded_test_server/http_request.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/ssl/ssl_cipher_suite_names.h ('k') | net/test/embedded_test_server/http_request.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ 5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_
6 #define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ 6 #define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 18 matching lines...) Expand all
29 // Represents a HTTP request. Since it can be big, use scoped_ptr to pass it 29 // Represents a HTTP request. Since it can be big, use scoped_ptr to pass it
30 // instead of copying. However, the struct is copyable so tests can save and 30 // instead of copying. However, the struct is copyable so tests can save and
31 // examine a HTTP request. 31 // examine a HTTP request.
32 struct HttpRequest { 32 struct HttpRequest {
33 HttpRequest(); 33 HttpRequest();
34 ~HttpRequest(); 34 ~HttpRequest();
35 35
36 std::string relative_url; // Starts with '/'. Example: "/test?query=foo" 36 std::string relative_url; // Starts with '/'. Example: "/test?query=foo"
37 HttpMethod method; 37 HttpMethod method;
38 std::string method_string; 38 std::string method_string;
39 std::string all_headers;
39 std::map<std::string, std::string> headers; 40 std::map<std::string, std::string> headers;
40 std::string content; 41 std::string content;
41 bool has_content; 42 bool has_content;
42 }; 43 };
43 44
44 // Parses the input data and produces a valid HttpRequest object. If there is 45 // Parses the input data and produces a valid HttpRequest object. If there is
45 // more than one request in one chunk, then only the first one will be parsed. 46 // more than one request in one chunk, then only the first one will be parsed.
46 // The common use is as below: 47 // The common use is as below:
47 // HttpRequestParser parser; 48 // HttpRequestParser parser;
48 // (...) 49 // (...)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Content length of the request currently being parsed. 108 // Content length of the request currently being parsed.
108 size_t declared_content_length_; 109 size_t declared_content_length_;
109 110
110 DISALLOW_COPY_AND_ASSIGN(HttpRequestParser); 111 DISALLOW_COPY_AND_ASSIGN(HttpRequestParser);
111 }; 112 };
112 113
113 } // namespace test_server 114 } // namespace test_server
114 } // namespace net 115 } // namespace net
115 116
116 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ 117 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_
OLDNEW
« no previous file with comments | « net/ssl/ssl_cipher_suite_names.h ('k') | net/test/embedded_test_server/http_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698