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

Issue 9148011: Allow chrome to handle 407 auth challenges to CONNECT requests (Closed)

Created:
8 years, 11 months ago by Ryan Hamilton
Modified:
8 years, 11 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Allow chrome to handle 407 auth challenges to CONNECT requests through HTTPS Proxies. This also changes the mechanism used to restart HttpProxyClientSocket requests with auth. Previously the transport socket would be Disconnected, and then re-Connected (which was not implemented for SSLClientSockets). However, the approach was problematic in the face of, for example, ipv6. The new approach is to close the HttpProxyClientSocket, and request a new socket from the pool. Initially was http://codereview.chromium.org/8502024 which turned out to have problems with NTLM auth. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=118950

Patch Set 1 #

Patch Set 2 : actually passes new unit test #

Patch Set 3 : '' #

Patch Set 4 : only HttpNetworkTransactionTest.SpdyAlternateProtocolThroughProxy fails #

Patch Set 5 : Stay on target #

Patch Set 6 : SpdyProxyClientSocket using *the* controller #

Patch Set 7 : Closer #

Patch Set 8 : Closer again #

Patch Set 9 : Closer again #

Patch Set 10 : All test pass! #

Patch Set 11 : Cleanup #

Patch Set 12 : More Cleanup #

Patch Set 13 : aborted attempt to change cb #2 #

Patch Set 14 : Possibly final state #

Patch Set 15 : '' #

Total comments: 43

Patch Set 16 : Removed Jingle todo #

Total comments: 1

Patch Set 17 : Use weak pointer instead of Unretained(this) in jingle #

Total comments: 6

Patch Set 18 : Address feedback from both vandebo and akalin #

Total comments: 19

Patch Set 19 : jingle nits #

Patch Set 20 : address feedback from cbentzel #

Patch Set 21 : '' #

Total comments: 19

Patch Set 22 : '' #

Total comments: 5

Patch Set 23 : '' #

Patch Set 24 : sync #

Patch Set 25 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+941 lines, -150 lines) Patch
M jingle/notifier/base/proxy_resolving_client_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +15 lines, -1 line 0 comments Download
M net/base/net_error_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +3 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 12 chunks +565 lines, -10 lines 0 comments Download
M net/http/http_proxy_client_socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +3 lines, -16 lines 0 comments Download
M net/http/http_proxy_client_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 8 chunks +11 lines, -45 lines 0 comments Download
M net/http/http_proxy_client_socket_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 8 chunks +28 lines, -1 line 0 comments Download
M net/http/http_proxy_client_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 9 chunks +79 lines, -8 lines 0 comments Download
M net/http/http_proxy_client_socket_pool_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +29 lines, -12 lines 0 comments Download
M net/http/http_proxy_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +9 lines, -0 lines 0 comments Download
M net/http/http_proxy_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +16 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +11 lines, -1 line 0 comments Download
M net/http/http_stream_factory_impl_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +37 lines, -12 lines 0 comments Download
M net/http/http_stream_factory_impl_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M net/http/proxy_client_socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +10 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +5 lines, -2 lines 0 comments Download
M net/socket/client_socket_pool_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +12 lines, -6 lines 0 comments Download
M net/socket/ssl_client_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_pool_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +12 lines, -2 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +3 lines, -7 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +26 lines, -12 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 chunks +64 lines, -12 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
Ryan Hamilton
At long last, I think I've got this to work. *whew* Please take a look...
8 years, 11 months ago (2012-01-12 19:37:03 UTC) #1
Ryan Hamilton
Grr. I sent this out for review last week, but manage to omit a reviewer. ...
8 years, 11 months ago (2012-01-17 16:33:22 UTC) #2
vandebo (ex-Chrome)
On 2012/01/17 16:33:22, Ryan Hamilton wrote: > Grr. I sent this out for review last ...
8 years, 11 months ago (2012-01-17 19:22:50 UTC) #3
Ryan Hamilton
On 2012/01/17 19:22:50, vandebo wrote: > On 2012/01/17 16:33:22, Ryan Hamilton wrote: > > Grr. ...
8 years, 11 months ago (2012-01-17 19:25:35 UTC) #4
vandebo (ex-Chrome)
On 2012/01/17 19:25:35, Ryan Hamilton wrote: > On 2012/01/17 19:22:50, vandebo wrote: > > On ...
8 years, 11 months ago (2012-01-17 19:26:23 UTC) #5
Ryan Hamilton
Adding cbentzel
8 years, 11 months ago (2012-01-17 20:08:50 UTC) #6
cbentzel
I won't get a chance to review this until tomorrow morning. Is that OK? On ...
8 years, 11 months ago (2012-01-17 20:19:57 UTC) #7
cbentzel
Adding asanka as well. http://codereview.chromium.org/9148011/diff/28005/jingle/notifier/base/proxy_resolving_client_socket.cc File jingle/notifier/base/proxy_resolving_client_socket.cc (right): http://codereview.chromium.org/9148011/diff/28005/jingle/notifier/base/proxy_resolving_client_socket.cc#newcode189 jingle/notifier/base/proxy_resolving_client_socket.cc:189: // TODO(rch): figure out what ...
8 years, 11 months ago (2012-01-18 12:14:22 UTC) #8
rch (use chromium not google)
Good point. Yes, this should be resolved before landing. I'll grab someone from jingle to ...
8 years, 11 months ago (2012-01-18 17:11:56 UTC) #9
Ryan Hamilton
vandebo, cbentzel: ping
8 years, 11 months ago (2012-01-19 17:21:31 UTC) #10
vandebo (ex-Chrome)
On 2012/01/19 17:21:31, Ryan Hamilton wrote: > vandebo, cbentzel: ping I'm in the middle of ...
8 years, 11 months ago (2012-01-19 17:28:46 UTC) #11
rch (use chromium not google)
On Thu, Jan 19, 2012 at 9:28 AM, <vandebo@chromium.org> wrote: > On 2012/01/19 17:21:31, Ryan ...
8 years, 11 months ago (2012-01-19 17:32:46 UTC) #12
cbentzel
OK. Will proceed then. On Thu, Jan 19, 2012 at 12:32 PM, Ryan Hamilton <rch@google.com> ...
8 years, 11 months ago (2012-01-19 17:53:41 UTC) #13
vandebo (ex-Chrome)
I haven't looked at the updates to testing code yet, but figured you'd like these ...
8 years, 11 months ago (2012-01-19 20:12:49 UTC) #14
akalin
http://codereview.chromium.org/9148011/diff/28005/jingle/notifier/base/proxy_resolving_client_socket.cc File jingle/notifier/base/proxy_resolving_client_socket.cc (right): http://codereview.chromium.org/9148011/diff/28005/jingle/notifier/base/proxy_resolving_client_socket.cc#newcode189 jingle/notifier/base/proxy_resolving_client_socket.cc:189: // TODO(rch): figure out what to do here so ...
8 years, 11 months ago (2012-01-19 21:07:37 UTC) #15
Ryan Hamilton
On 2012/01/19 21:07:37, akalin wrote: > http://codereview.chromium.org/9148011/diff/28005/jingle/notifier/base/proxy_resolving_client_socket.cc > File jingle/notifier/base/proxy_resolving_client_socket.cc (right): > > http://codereview.chromium.org/9148011/diff/28005/jingle/notifier/base/proxy_resolving_client_socket.cc#newcode189 > ...
8 years, 11 months ago (2012-01-19 21:17:25 UTC) #16
akalin
http://codereview.chromium.org/9148011/diff/39001/jingle/notifier/base/proxy_resolving_client_socket.cc File jingle/notifier/base/proxy_resolving_client_socket.cc (right): http://codereview.chromium.org/9148011/diff/39001/jingle/notifier/base/proxy_resolving_client_socket.cc#newcode177 jingle/notifier/base/proxy_resolving_client_socket.cc:177: base::Unretained(this))); is it really safe to use Unretained here? ...
8 years, 11 months ago (2012-01-19 21:20:39 UTC) #17
Ryan Hamilton
On 2012/01/19 21:20:39, akalin wrote: > http://codereview.chromium.org/9148011/diff/39001/jingle/notifier/base/proxy_resolving_client_socket.cc > File jingle/notifier/base/proxy_resolving_client_socket.cc (right): > > http://codereview.chromium.org/9148011/diff/39001/jingle/notifier/base/proxy_resolving_client_socket.cc#newcode177 > ...
8 years, 11 months ago (2012-01-19 21:42:09 UTC) #18
akalin
http://codereview.chromium.org/9148011/diff/37006/jingle/notifier/base/proxy_resolving_client_socket.cc File jingle/notifier/base/proxy_resolving_client_socket.cc (right): http://codereview.chromium.org/9148011/diff/37006/jingle/notifier/base/proxy_resolving_client_socket.cc#newcode186 jingle/notifier/base/proxy_resolving_client_socket.cc:186: void ProxyResolvingClientSocket::OnNeedsProxyTunnelAuthCallback( actually, since this function doesn't do much, ...
8 years, 11 months ago (2012-01-19 22:12:48 UTC) #19
Ryan Hamilton
http://codereview.chromium.org/9148011/diff/28005/jingle/notifier/base/proxy_resolving_client_socket.cc File jingle/notifier/base/proxy_resolving_client_socket.cc (right): http://codereview.chromium.org/9148011/diff/28005/jingle/notifier/base/proxy_resolving_client_socket.cc#newcode189 jingle/notifier/base/proxy_resolving_client_socket.cc:189: // TODO(rch): figure out what to do here On ...
8 years, 11 months ago (2012-01-19 23:11:18 UTC) #20
akalin
sync lgtm after nits http://codereview.chromium.org/9148011/diff/38007/jingle/notifier/base/proxy_resolving_client_socket.cc File jingle/notifier/base/proxy_resolving_client_socket.cc (left): http://codereview.chromium.org/9148011/diff/38007/jingle/notifier/base/proxy_resolving_client_socket.cc#oldcode183 jingle/notifier/base/proxy_resolving_client_socket.cc:183: void ProxyResolvingClientSocket::ProcessConnectDone(int status) { Remove ...
8 years, 11 months ago (2012-01-20 01:45:56 UTC) #21
cbentzel
This approach looks good, as does the test coverage. Will try to do a nit-picking ...
8 years, 11 months ago (2012-01-20 02:09:45 UTC) #22
Ryan Hamilton
akalin: thanks for the lgtm! I've fixed your nits. http://codereview.chromium.org/9148011/diff/38007/jingle/notifier/base/proxy_resolving_client_socket.cc File jingle/notifier/base/proxy_resolving_client_socket.cc (left): http://codereview.chromium.org/9148011/diff/38007/jingle/notifier/base/proxy_resolving_client_socket.cc#oldcode183 jingle/notifier/base/proxy_resolving_client_socket.cc:183: ...
8 years, 11 months ago (2012-01-20 03:51:02 UTC) #23
Ryan Hamilton
http://codereview.chromium.org/9148011/diff/28005/net/http/http_proxy_client_socket_pool.h File net/http/http_proxy_client_socket_pool.h (right): http://codereview.chromium.org/9148011/diff/28005/net/http/http_proxy_client_socket_pool.h#newcode39 net/http/http_proxy_client_socket_pool.h:39: // from an HTTP proxy when attempting to establish ...
8 years, 11 months ago (2012-01-20 04:20:03 UTC) #24
cbentzel
http://codereview.chromium.org/9148011/diff/28005/net/http/http_stream_factory_impl_job.cc File net/http/http_stream_factory_impl_job.cc (right): http://codereview.chromium.org/9148011/diff/28005/net/http/http_stream_factory_impl_job.cc#newcode186 net/http/http_stream_factory_impl_job.cc:186: MessageLoop::current()->PostTask( On 2012/01/20 04:20:04, Ryan Hamilton wrote: > On ...
8 years, 11 months ago (2012-01-20 11:15:46 UTC) #25
Ryan Hamilton
http://codereview.chromium.org/9148011/diff/28005/net/http/http_stream_factory_impl_job.cc File net/http/http_stream_factory_impl_job.cc (right): http://codereview.chromium.org/9148011/diff/28005/net/http/http_stream_factory_impl_job.cc#newcode186 net/http/http_stream_factory_impl_job.cc:186: MessageLoop::current()->PostTask( On 2012/01/20 11:15:46, cbentzel wrote: > On 2012/01/20 ...
8 years, 11 months ago (2012-01-20 17:20:13 UTC) #26
vandebo (ex-Chrome)
http://codereview.chromium.org/9148011/diff/28005/net/http/http_stream_factory_impl_job.h File net/http/http_stream_factory_impl_job.h (right): http://codereview.chromium.org/9148011/diff/28005/net/http/http_stream_factory_impl_job.h#newcode51 net/http/http_stream_factory_impl_job.h:51: void ReallyRestartTunnelWithProxyAuth(); On 2012/01/19 23:11:19, Ryan Hamilton wrote: > ...
8 years, 11 months ago (2012-01-20 20:49:28 UTC) #27
Ryan Hamilton
http://codereview.chromium.org/9148011/diff/49002/net/http/http_proxy_client_socket.cc File net/http/http_proxy_client_socket.cc (left): http://codereview.chromium.org/9148011/diff/49002/net/http/http_proxy_client_socket.cc#oldcode264 net/http/http_proxy_client_socket.cc:264: transport_->socket()->Disconnect(); On 2012/01/20 20:49:29, vandebo wrote: > I think ...
8 years, 11 months ago (2012-01-20 21:51:34 UTC) #28
vandebo (ex-Chrome)
LGTM http://codereview.chromium.org/9148011/diff/49002/net/spdy/spdy_proxy_client_socket_unittest.cc File net/spdy/spdy_proxy_client_socket_unittest.cc (right): http://codereview.chromium.org/9148011/diff/49002/net/spdy/spdy_proxy_client_socket_unittest.cc#newcode518 net/spdy/spdy_proxy_client_socket_unittest.cc:518: On 2012/01/20 21:51:35, Ryan Hamilton wrote: > On ...
8 years, 11 months ago (2012-01-20 21:58:20 UTC) #29
Ryan Hamilton
http://codereview.chromium.org/9148011/diff/49002/net/spdy/spdy_proxy_client_socket_unittest.cc File net/spdy/spdy_proxy_client_socket_unittest.cc (right): http://codereview.chromium.org/9148011/diff/49002/net/spdy/spdy_proxy_client_socket_unittest.cc#newcode518 net/spdy/spdy_proxy_client_socket_unittest.cc:518: On 2012/01/20 21:58:20, vandebo wrote: > On 2012/01/20 21:51:35, ...
8 years, 11 months ago (2012-01-23 18:37:27 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rch@chromium.org/9148011/63003
8 years, 11 months ago (2012-01-24 21:00:30 UTC) #31
commit-bot: I haz the power
Try job failure for 9148011-63003 (retry) on linux_rel for step "compile" (clobber build). It's a ...
8 years, 11 months ago (2012-01-24 21:33:24 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rch@chromium.org/9148011/63009
8 years, 11 months ago (2012-01-24 21:54:04 UTC) #33
commit-bot: I haz the power
8 years, 11 months ago (2012-01-25 00:11:24 UTC) #34
Change committed as 118950

Powered by Google App Engine
This is Rietveld 408576698