OLD | NEW |
1 // Copyright (c) 2012 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_HTTP_HTTP_PROXY_UTILS_H_ | 5 #ifndef NET_HTTP_HTTP_PROXY_UTILS_H_ |
6 #define NET_HTTP_HTTP_PROXY_UTILS_H_ | 6 #define NET_HTTP_HTTP_PROXY_UTILS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 class BoundNetLog; | |
14 class HttpAuthController; | |
15 class HttpResponseInfo; | |
16 struct HttpRequestInfo; | 13 struct HttpRequestInfo; |
17 class HttpRequestHeaders; | 14 class HttpRequestHeaders; |
18 class HostPortPair; | 15 class HostPortPair; |
19 | 16 |
20 // The HTTP CONNECT method for establishing a tunnel connection is documented | 17 // The HTTP CONNECT method for establishing a tunnel connection is documented |
21 // in draft-luotonen-web-proxy-tunneling-01.txt and RFC 2817, Sections 5.2 and | 18 // in draft-luotonen-web-proxy-tunneling-01.txt and RFC 2817, Sections 5.2 and |
22 // 5.3. | 19 // 5.3. |
23 void BuildTunnelRequest(const HttpRequestInfo& request_info, | 20 void BuildTunnelRequest(const HttpRequestInfo& request_info, |
24 const HttpRequestHeaders& auth_headers, | 21 const HttpRequestHeaders& auth_headers, |
25 const HostPortPair& endpoint, | 22 const HostPortPair& endpoint, |
26 std::string* request_line, | 23 std::string* request_line, |
27 HttpRequestHeaders* request_headers); | 24 HttpRequestHeaders* request_headers); |
28 | 25 |
29 // When an auth challenge (407 response) is received during tunnel construction | |
30 // this method should be called. | |
31 int HandleAuthChallenge(HttpAuthController* auth, | |
32 HttpResponseInfo* response, | |
33 const BoundNetLog& net_log); | |
34 | |
35 } // namespace net | 26 } // namespace net |
36 | 27 |
37 #endif // NET_HTTP_HTTP_PROXY_UTILS_H_ | 28 #endif // NET_HTTP_HTTP_PROXY_UTILS_H_ |
OLD | NEW |