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

Issue 4935001: Allow a non-200 (or non-407) response for a CONNECT request from an HTTPS pro... (Closed)

Created:
10 years, 1 month ago by Ryan Hamilton
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, cbentzel+watch_chromium.org, ben+cc_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Allow a non-200 (or non-407) response for a CONNECT request from an HTTPS proxy to be consumed by chrome. Among other things, this will allow the proxy to inform the user that the hostname could not be resolved or similar conditions. This adds a new OnHttpsProxyTunnelConnectionResponse method to StreamRequest::Delegate which is invoked when an HTTPS proxy returns a non-200, non-407 response. The method is called with an HttpResponseInfor argument to access the request headers, and an HttpStream argument to access the response body. BUG=none TEST=HttpNetworkTransactionTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69513

Patch Set 1 #

Patch Set 2 : Rename callback to OnHttpsProxyTunnelConnectionFailed #

Patch Set 3 : Add support to SpdyProxyClientSocket too #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : Feature Complete #

Patch Set 7 : Rebase #

Patch Set 8 : Renamed from OnHttpsProxyTunnelConnectionFailed to OnHttpsProxyTunnelConnectionResponse #

Patch Set 9 : Cleaned up #

Patch Set 10 : Cleaned up #

Patch Set 11 : Added HttpProxyTunnelClientSocket #

Patch Set 12 : '' #

Patch Set 13 : Cleaned up #

Total comments: 60

Patch Set 14 : '' #

Total comments: 2

Patch Set 15 : Use Sockets instead of Stream for passing the response from the Pool to the StreamRequest #

Patch Set 16 : Remove stray reference to connect_response_http_stream.h #

Patch Set 17 : Remove stray reference to connect_response_http_stream.h #

Total comments: 33

Patch Set 18 : Renamed #

Patch Set 19 : Addressing the comments from vandebo and willchan #

Total comments: 2

Patch Set 20 : Pass a ClientSocketHandle up out of the HttpProxyClientSocketPool #

Total comments: 10

Patch Set 21 : '' #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+450 lines, -50 lines) Patch
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -9 lines 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 1 chunk +5 lines, -0 lines 0 comments Download
M net/http/http_basic_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +7 lines, -1 line 0 comments Download
M net/http/http_basic_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +5 lines, -1 line 0 comments Download
M net/http/http_network_transaction.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +20 lines, -3 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 2 chunks +235 lines, -2 lines 1 comment 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 6 chunks +10 lines, -5 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 6 chunks +14 lines, -2 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 2 chunks +2 lines, -1 line 1 comment 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 1 chunk +5 lines, -2 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 1 chunk +12 lines, -3 lines 0 comments Download
M net/http/http_stream_request.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_stream_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +33 lines, -7 lines 0 comments Download
A 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 1 chunk +35 lines, -0 lines 0 comments Download
M net/http/stream_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +7 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/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 1 chunk +2 lines, -2 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 1 chunk +3 lines, -2 lines 0 comments Download
M net/spdy/spdy_http_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -1 line 0 comments Download
M net/spdy/spdy_http_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +9 lines, -1 line 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 4 chunks +14 lines, -3 lines 1 comment 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 2 chunks +19 lines, -2 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 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Ryan Hamilton
I believe I have this CL complete. Steve, I bounced an earlier version of it ...
10 years ago (2010-12-02 23:08:00 UTC) #1
vandebo (ex-Chrome)
Feel free to ignore any of the name suggestions. http://codereview.chromium.org/4935001/diff/192001/chrome/browser/renderer_host/resource_dispatcher_host.cc File chrome/browser/renderer_host/resource_dispatcher_host.cc (left): http://codereview.chromium.org/4935001/diff/192001/chrome/browser/renderer_host/resource_dispatcher_host.cc#oldcode1575 chrome/browser/renderer_host/resource_dispatcher_host.cc:1575: ...
10 years ago (2010-12-04 00:30:37 UTC) #2
Mike Belshe
+cc WillChan: you might want to take a look?
10 years ago (2010-12-07 17:17:23 UTC) #3
Ryan Hamilton
Steve, Thanks for the review! I believe I have addressed all of your (non-naming) comments. ...
10 years ago (2010-12-09 21:19:35 UTC) #4
Ryan Hamilton
On 2010/12/04 00:30:37, vandebo wrote: > Feel free to ignore any of the name suggestions. ...
10 years ago (2010-12-09 21:39:22 UTC) #5
vandebo (ex-Chrome)
A couple quick comments, I'll look through the code changes next. On 2010/12/09 21:39:22, Ryan ...
10 years ago (2010-12-11 02:47:49 UTC) #6
Ryan Hamilton
Ok, I've changed this CL to traffic in Sockets instead of Streams from the pool ...
10 years ago (2010-12-13 19:41:11 UTC) #7
vandebo (ex-Chrome)
I'm sorry to say that I found another hiccup; as is, this doesn't handle connection ...
10 years ago (2010-12-14 00:30:22 UTC) #8
willchan no longer on Chromium
This is very interesting! I think I'm going to defer to vandebo for almost everything. ...
10 years ago (2010-12-14 00:34:42 UTC) #9
Ryan Hamilton
On 2010/12/14 00:30:22, vandebo wrote: > I'm sorry to say that I found another hiccup; ...
10 years ago (2010-12-14 18:01:01 UTC) #10
vandebo (ex-Chrome)
On 2010/12/14 18:01:01, Ryan Hamilton wrote: > On 2010/12/14 00:30:22, vandebo wrote: > > I'm ...
10 years ago (2010-12-14 18:09:23 UTC) #11
Ryan Hamilton
I've addressed all of Will's comments, and most of Steve's. The only two outstanding issues ...
10 years ago (2010-12-15 20:14:17 UTC) #12
Ryan Hamilton
(Argh! I just composed a long reply, but got an invalid XSRF token which ate ...
10 years ago (2010-12-15 22:26:35 UTC) #13
vandebo (ex-Chrome)
On 2010/12/15 22:26:35, Ryan Hamilton wrote: > (Argh! I just composed a long reply, but ...
10 years ago (2010-12-15 22:52:37 UTC) #14
Ryan Hamilton
On Wed, Dec 15, 2010 at 2:52 PM, <vandebo@chromium.org> wrote: > > > I don't ...
10 years ago (2010-12-15 23:29:21 UTC) #15
Ryan Hamilton
On 2010/12/15 22:52:37, vandebo wrote: > I don't see how passing up socket 3 is ...
10 years ago (2010-12-16 00:21:03 UTC) #16
vandebo (ex-Chrome)
Ehh, I liked it better before... J/K Thank you for making this change. It ends ...
10 years ago (2010-12-16 02:24:31 UTC) #17
Ryan Hamilton
On 2010/12/16 02:24:31, vandebo wrote: > Ehh, I liked it better before... *hah* I almost ...
10 years ago (2010-12-16 05:23:49 UTC) #18
vandebo (ex-Chrome)
LGTM On 2010/12/16 05:23:49, Ryan Hamilton wrote: > Yeah, that really did turn out to ...
10 years ago (2010-12-16 17:59:23 UTC) #19
Ryan Hamilton
On 2010/12/16 17:59:23, vandebo wrote: > LGTM Awesome. http://codereview.chromium.org/4935001/diff/335002/net/http/http_network_transaction_unittest.cc > File net/http/http_network_transaction_unittest.cc (right): > > ...
10 years ago (2010-12-17 03:33:04 UTC) #20
vandebo (ex-Chrome)
10 years ago (2010-12-17 17:36:22 UTC) #21
On 2010/12/17 03:33:04, Ryan Hamilton wrote:
> On 2010/12/16 17:59:23, vandebo wrote:
http://codereview.chromium.org/4935001/diff/335002/net/http/http_network_tran...
> > net/http/http_network_transaction_unittest.cc:4628:
> > EXPECT_FALSE(response->ssl_info.is_valid());
> > Just to double check, this is true in some other unit tests?
> 
> Doh!  Alas not.  Looks like out test infrastructure doesn't set this in the
> successful case.  Sounds like that would be a good improvement.  I'll leave
the
> code in the test to  express the intent at least (and if we ever fix the
> framework, even better).

Actually, it could be misleading to see this code and think it does the check we
want.  Maybe change this to a TODO in your cleanup CL.

Powered by Google App Engine
This is Rietveld 408576698