New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 725682 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit 22 days ago
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Offliners do not handle BadGateway pages

Project Member Reported by chili@chromium.org, May 23 2017

Issue description

BadGateway (error 502) is not translated to a net error the way 404 not found or some of the other error pages do.  This is because it's a server error rather than some sort of transport/net error/navigation type issue that is experienced by the client/user

And because it's not a net error, it's not caught by the current fail-offlining mechanisms that we use to prevent error pages from being saved.

The question here is: 1. should we prevent this because it's an error page? and 2. if so, figure out a way to acquire the http status code for the main resource
 

Comment 1 by dim...@chromium.org, May 23 2017

This is often produced by proxy when it receives a bad response from upstream server. Might be a transient error at the proxy's connection, in which case we would want to retry. 
So yes, I think we want to treat it as error.

Comment 2 by mmenke@chromium.org, May 24 2017

404s aren't translated into a net error code, actually.

Regardless, 4xx/5xx responses should probably never be cached.

Comment 3 by mmenke@chromium.org, May 24 2017

(Or at least they're not translated to a net::Error value by code in net/)

Comment 4 by chili@chromium.org, May 24 2017

Cc: mmenke@chromium.org
@mmenke 
There is a FILE_NOT_FOUND (-6) net error: https://cs.chromium.org/chromium/src/net/base/net_error_list.h?rcl=2f5f09f37f44b88d39917da4a8e096765300b936&l=41

I assumed this corresponded to a 404, and navigating to a 404 page seemed to have triggered it? If it wasn't the http request, do you know what would result in this error?

Comment 5 by mmenke@chromium.org, May 24 2017

Nope.  It's used for file URLs and the like - network errors are only for transport layer errors (And authentication errors, I suppose), where we don't have an HTTP response body to display, and should instead be displaying an error page, or what a response is cut off.  They're not for cases where we have a valid HTTP response to display, even if it's an error response.

Comment 6 by chili@chromium.org, May 24 2017

Is there a way to get the http response code from NavigationController or WebContents?

Comment 7 by jiewu@chromium.org, May 24 2017

Cathy,

Just in case that you still need a server that consistently produces 502:

http://www.youku.com/playlist_show/id_25870802.html

This webpage consistently gave me 502 error in the past 12 hours.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f58b43a235e222eeb4620d5f379182c78414189

commit 6f58b43a235e222eeb4620d5f379182c78414189
Author: Cathy Li <chili@chromium.org>
Date: Thu Jun 15 01:42:58 2017

[Offline pages] Detect and record http error codes in new combined UMA. Also fix test flake caused by deleting calling object.

NetError codes are reported for the network errors for which chrome would have to generate our own
error message and error page. http error codes are when the server had an error, often accompanied
by server-generated error page. Either way, our decision on not downloading any error page still
applies.

Bug:  725682 ,  722556 
Change-Id: I9f016b5724a8ea6a98b574bd41d490ceb5aeb197
Reviewed-on: https://chromium-review.googlesource.com/517812
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Filip Gorski <fgorski@chromium.org>
Reviewed-by: Peter Williamson <petewil@chromium.org>
Commit-Queue: Cathy Li <chili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479575}
[modify] https://crrev.com/6f58b43a235e222eeb4620d5f379182c78414189/chrome/browser/offline_pages/background_loader_offliner.cc
[modify] https://crrev.com/6f58b43a235e222eeb4620d5f379182c78414189/chrome/browser/offline_pages/background_loader_offliner_unittest.cc
[modify] https://crrev.com/6f58b43a235e222eeb4620d5f379182c78414189/content/public/test/web_contents_tester.h
[modify] https://crrev.com/6f58b43a235e222eeb4620d5f379182c78414189/content/test/test_web_contents.cc
[modify] https://crrev.com/6f58b43a235e222eeb4620d5f379182c78414189/content/test/test_web_contents.h
[modify] https://crrev.com/6f58b43a235e222eeb4620d5f379182c78414189/tools/metrics/histograms/histograms.xml

Comment 9 by chili@chromium.org, Jun 15 2017

Status: Fixed (was: Available)

Sign in to add a comment