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

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

Issue 640593004: Fix a pair of Cronet upload bugs and add tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder fields Created 6 years, 2 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/base/net_error_list.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 17 matching lines...) Expand all
28 28
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::map<std::string, std::string> headers; 39 std::map<std::string, std::string> headers;
39 std::string content; 40 std::string content;
40 bool has_content; 41 bool has_content;
41 }; 42 };
42 43
43 // Parses the input data and produces a valid HttpRequest object. If there is 44 // Parses the input data and produces a valid HttpRequest object. If there is
44 // more than one request in one chunk, then only the first one will be parsed. 45 // more than one request in one chunk, then only the first one will be parsed.
45 // The common use is as below: 46 // The common use is as below:
46 // HttpRequestParser parser; 47 // HttpRequestParser parser;
47 // (...) 48 // (...)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Content length of the request currently being parsed. 107 // Content length of the request currently being parsed.
107 size_t declared_content_length_; 108 size_t declared_content_length_;
108 109
109 DISALLOW_COPY_AND_ASSIGN(HttpRequestParser); 110 DISALLOW_COPY_AND_ASSIGN(HttpRequestParser);
110 }; 111 };
111 112
112 } // namespace test_server 113 } // namespace test_server
113 } // namespace net 114 } // namespace net
114 115
115 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ 116 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_
OLDNEW
« no previous file with comments | « net/base/net_error_list.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