| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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; |
| 13 struct HttpRequestInfo; | 16 struct HttpRequestInfo; |
| 14 class HttpRequestHeaders; | 17 class HttpRequestHeaders; |
| 15 class HostPortPair; | 18 class HostPortPair; |
| 16 | 19 |
| 17 // The HTTP CONNECT method for establishing a tunnel connection is documented | 20 // The HTTP CONNECT method for establishing a tunnel connection is documented |
| 18 // in draft-luotonen-web-proxy-tunneling-01.txt and RFC 2817, Sections 5.2 and | 21 // in draft-luotonen-web-proxy-tunneling-01.txt and RFC 2817, Sections 5.2 and |
| 19 // 5.3. | 22 // 5.3. |
| 20 void BuildTunnelRequest(const HttpRequestInfo& request_info, | 23 void BuildTunnelRequest(const HttpRequestInfo& request_info, |
| 21 const HttpRequestHeaders& auth_headers, | 24 const HttpRequestHeaders& auth_headers, |
| 22 const HostPortPair& endpoint, | 25 const HostPortPair& endpoint, |
| 23 std::string* request_line, | 26 std::string* request_line, |
| 24 HttpRequestHeaders* request_headers); | 27 HttpRequestHeaders* request_headers); |
| 25 | 28 |
| 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 |
| 26 } // namespace net | 35 } // namespace net |
| 27 | 36 |
| 28 #endif // NET_HTTP_HTTP_PROXY_UTILS_H_ | 37 #endif // NET_HTTP_HTTP_PROXY_UTILS_H_ |
| OLD | NEW |