Offliners do not handle BadGateway pages |
|||
Issue descriptionBadGateway (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
,
May 24 2017
404s aren't translated into a net error code, actually. Regardless, 4xx/5xx responses should probably never be cached.
,
May 24 2017
(Or at least they're not translated to a net::Error value by code in net/)
,
May 24 2017
@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?
,
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.
,
May 24 2017
Is there a way to get the http response code from NavigationController or WebContents?
,
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.
,
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
,
Jun 15 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by dim...@chromium.org
, May 23 2017