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

Issue 502068: Remove the implicit fallback to DIRECT when proxies fail. This better matches... (Closed)

Created:
11 years ago by eroman
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), Paweł Hajdan Jr.
Visibility:
Public.

Description

Remove the implicit fallback to DIRECT when proxies fail. This better matches other browsers, and simplifies the code. To better understand what this means, here are some examples how the behaviors will differ for the user: (1) You start chrome with --proxy-server="foobar:80". The server "foobar:80" is refusing connections. Before: Would fallback to direct after failing to connect through foobar:80. Now: Will error-out with connection refused after failing to connect through foobar:80. (2) You start chrome with --proxy-pac-url="file:///foobar.pac". The server "foobar:80" is unreachable, and foobar.pac reads: function FindProxyForURL(url, host) { return "PROXY foobar:80"; } Before: Would fallback to direct after failing to connect through foobar:80. Now: Will error-out with connection refused after failing to connect through foobar:80. (3) You start chrome with --proxy-pac-url="file:///foobar.pac". The server "foobar:80" is unreachable, and foobar.pac reads: function FindProxyForURL(url, host) { return "PROXY foobar:80; DIRECT"; } *No change, since the fallback to DIRECT is explicit in the PAC script* BUG=12303 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35549

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 5

Patch Set 3 : Sync #

Patch Set 4 : Add error code ERR_PROXY_LIST_EMPTY #

Patch Set 5 : Fix problem in ordering (todo: add a unittest that exercises) #

Patch Set 6 : Fix a comment typo #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -149 lines) Patch
M net/base/net_error_list.h View 4 5 1 chunk +3 lines, -0 lines 1 comment Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 2 chunks +47 lines, -2 lines 3 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M net/proxy/proxy_info.h View 1 2 3 4 5 2 chunks +15 lines, -9 lines 4 comments Download
M net/proxy/proxy_info.cc View 1 2 3 4 5 2 chunks +2 lines, -4 lines 0 comments Download
M net/proxy/proxy_list.h View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M net/proxy/proxy_list.cc View 1 2 3 4 5 3 chunks +42 lines, -18 lines 0 comments Download
M net/proxy/proxy_list_unittest.cc View 1 2 3 4 5 3 chunks +14 lines, -2 lines 0 comments Download
M net/proxy/proxy_server.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M net/proxy/proxy_service.h View 1 2 3 4 5 2 chunks +0 lines, -9 lines 0 comments Download
M net/proxy/proxy_service.cc View 1 2 3 4 5 7 chunks +12 lines, -60 lines 4 comments Download
M net/proxy/proxy_service_unittest.cc View 1 2 3 4 5 6 chunks +162 lines, -43 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
eroman
11 years ago (2009-12-18 02:24:01 UTC) #1
wtc
http://codereview.chromium.org/502068/diff/2007/2016 File net/proxy/proxy_service_unittest.cc (right): http://codereview.chromium.org/502068/diff/2007/2016#newcode224 net/proxy/proxy_service_unittest.cc:224: EXPECT_EQ(ERR_FAILED, rv); Can ReconsiderProxyAfterError return a better error code ...
11 years ago (2009-12-19 05:14:27 UTC) #2
eroman
http://codereview.chromium.org/502068/diff/2007/2016 File net/proxy/proxy_service_unittest.cc (right): http://codereview.chromium.org/502068/diff/2007/2016#newcode224 net/proxy/proxy_service_unittest.cc:224: EXPECT_EQ(ERR_FAILED, rv); On 2009/12/19 05:14:27, wtc wrote: > Can ...
11 years ago (2009-12-19 05:59:15 UTC) #3
eroman
ping
10 years, 11 months ago (2010-01-04 18:35:16 UTC) #4
darin (slow to review)
LGTM, except for: http://codereview.chromium.org/502068/diff/2007/2009 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/502068/diff/2007/2009#newcode558 net/http/http_network_transaction.cc:558: return ERR_FAILED; probably worth it to ...
10 years, 11 months ago (2010-01-05 00:22:06 UTC) #5
eroman
http://codereview.chromium.org/502068/diff/2007/2009 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/502068/diff/2007/2009#newcode558 net/http/http_network_transaction.cc:558: return ERR_FAILED; On 2010/01/05 00:22:06, darin wrote: > probably ...
10 years, 11 months ago (2010-01-05 01:55:33 UTC) #6
wtc
Eric, Sorry I didn't review this CL in time. I did a quick and incomplete ...
10 years, 11 months ago (2010-01-07 20:12:26 UTC) #7
wtc
http://codereview.chromium.org/502068/diff/9006/4026 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/502068/diff/9006/4026#newcode1594 net/http/http_network_transaction.cc:1594: // If ReconsiderProxyAfterError() failed synchronously, it means Nit: ReconsiderProxyAfterError() ...
10 years, 11 months ago (2010-01-07 20:25:37 UTC) #8
eroman
http://codereview.chromium.org/502068/diff/9006/4027 File net/proxy/proxy_info.h (right): http://codereview.chromium.org/502068/diff/9006/4027#newcode47 net/proxy/proxy_info.h:47: // We don't implicitly fallback to DIRECT unless it ...
10 years, 11 months ago (2010-01-07 21:08:19 UTC) #9
wtc
http://codereview.chromium.org/502068/diff/9006/4027 File net/proxy/proxy_info.h (right): http://codereview.chromium.org/502068/diff/9006/4027#newcode47 net/proxy/proxy_info.h:47: // We don't implicitly fallback to DIRECT unless it ...
10 years, 11 months ago (2010-01-07 21:22:08 UTC) #10
wtc
10 years, 11 months ago (2010-01-07 21:53:56 UTC) #11
http://codereview.chromium.org/502068/diff/9006/4028
File net/proxy/proxy_service.cc (right):

http://codereview.chromium.org/502068/diff/9006/4028#newcode458
net/proxy/proxy_service.cc:458: return did_fallback ? OK : ERR_FAILED;
On 2010/01/07 21:22:09, wtc wrote:
>
> Now I think an async failure (with ERR_FAILED
> result code) will leak into HttpNetworkTransaction,
> because HttpNetworkTransaction does not save the original
> connection error code in a member variable.  We should
> file a bug about this.

eroman went though the async failure case with me, and
showed me that HttpNetworkTransaction::DoProxyResolveComplete
will fall back to DIRECT rather than failing with the
async failure result code of ProxyResolver.

Powered by Google App Engine
This is Rietveld 408576698