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

Side by Side Diff: net/http/proxy_client_socket.h

Issue 1391053002: [net/http auth] Make HttpAuthHandler challenge handling asynchronous. Base URL: https://chromium.googlesource.com/chromium/src.git@auth-handler-init-split
Patch Set: Created 5 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/http/http_proxy_client_socket.cc ('k') | net/http/proxy_client_socket.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_HTTP_PROXY_CLIENT_SOCKET_H_ 5 #ifndef NET_HTTP_PROXY_CLIENT_SOCKET_H_
6 #define NET_HTTP_PROXY_CLIENT_SOCKET_H_ 6 #define NET_HTTP_PROXY_CLIENT_SOCKET_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/socket/ssl_client_socket.h" 10 #include "net/socket/ssl_client_socket.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 protected: 56 protected:
57 // The HTTP CONNECT method for establishing a tunnel connection is documented 57 // The HTTP CONNECT method for establishing a tunnel connection is documented
58 // in draft-luotonen-web-proxy-tunneling-01.txt and RFC 2817, Sections 5.2 58 // in draft-luotonen-web-proxy-tunneling-01.txt and RFC 2817, Sections 5.2
59 // and 5.3. 59 // and 5.3.
60 static void BuildTunnelRequest(const HostPortPair& endpoint, 60 static void BuildTunnelRequest(const HostPortPair& endpoint,
61 const HttpRequestHeaders& auth_headers, 61 const HttpRequestHeaders& auth_headers,
62 const std::string& user_agent, 62 const std::string& user_agent,
63 std::string* request_line, 63 std::string* request_line,
64 HttpRequestHeaders* request_headers); 64 HttpRequestHeaders* request_headers);
65 65
66 // When an auth challenge (407 response) is received during tunnel
67 // construction/ this method should be called.
68 static int HandleProxyAuthChallenge(HttpAuthController* auth,
69 HttpResponseInfo* response,
70 const BoundNetLog& net_log);
71
72 // Logs (to the log and in a histogram) a blocked CONNECT response. 66 // Logs (to the log and in a histogram) a blocked CONNECT response.
73 static void LogBlockedTunnelResponse(int http_response_code, 67 static void LogBlockedTunnelResponse(int http_response_code,
74 bool is_https_proxy); 68 bool is_https_proxy);
75 69
76 // When a proxy authentication response is received during tunnel 70 // When a proxy authentication response is received during tunnel
77 // construction, this method should be called to strip everything 71 // construction, this method should be called to strip everything
78 // but the auth header from the redirect response. If it returns 72 // but the auth header from the redirect response. If it returns
79 // false, the response should be discarded and tunnel construction should 73 // false, the response should be discarded and tunnel construction should
80 // fail. 74 // fail.
81 static bool SanitizeProxyAuth(HttpResponseInfo* response); 75 static bool SanitizeProxyAuth(HttpResponseInfo* response);
82 76
83 // When a redirect (e.g. 302 response) is received during tunnel 77 // When a redirect (e.g. 302 response) is received during tunnel
84 // construction, this method should be called to strip everything 78 // construction, this method should be called to strip everything
85 // but the Location header from the redirect response. If it returns 79 // but the Location header from the redirect response. If it returns
86 // false, the response should be discarded and tunnel construction should 80 // false, the response should be discarded and tunnel construction should
87 // fail. 81 // fail.
88 static bool SanitizeProxyRedirect(HttpResponseInfo* response); 82 static bool SanitizeProxyRedirect(HttpResponseInfo* response);
89 83
90 private: 84 private:
91 DISALLOW_COPY_AND_ASSIGN(ProxyClientSocket); 85 DISALLOW_COPY_AND_ASSIGN(ProxyClientSocket);
92 }; 86 };
93 87
94 } // namespace net 88 } // namespace net
95 89
96 #endif // NET_HTTP_PROXY_CLIENT_SOCKET_H_ 90 #endif // NET_HTTP_PROXY_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/http/proxy_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698