OLD | NEW |
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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
14 | 14 |
15 namespace google_apis { | 15 namespace net { |
16 namespace test_server { | 16 namespace test_server { |
17 | 17 |
18 // Methods of HTTP requests supported by the test HTTP server. | 18 // Methods of HTTP requests supported by the test HTTP server. |
19 enum HttpMethod { | 19 enum HttpMethod { |
20 METHOD_UNKNOWN, | 20 METHOD_UNKNOWN, |
21 METHOD_GET, | 21 METHOD_GET, |
22 METHOD_HEAD, | 22 METHOD_HEAD, |
23 METHOD_POST, | 23 METHOD_POST, |
24 METHOD_PUT, | 24 METHOD_PUT, |
25 METHOD_DELETE, | 25 METHOD_DELETE, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 std::string buffer_; | 103 std::string buffer_; |
104 size_t buffer_position_; // Current position in the internal buffer. | 104 size_t buffer_position_; // Current position in the internal buffer. |
105 State state_; | 105 State state_; |
106 // Content length of the request currently being parsed. | 106 // Content length of the request currently being parsed. |
107 size_t declared_content_length_; | 107 size_t declared_content_length_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(HttpRequestParser); | 109 DISALLOW_COPY_AND_ASSIGN(HttpRequestParser); |
110 }; | 110 }; |
111 | 111 |
112 } // namespace test_server | 112 } // namespace test_server |
113 } // namespace google_apis | 113 } // namespace net |
114 | 114 |
115 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ | 115 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ |
OLD | NEW |