Open
Bug 968886
Opened 12 years ago
Updated 4 years ago
Page load just stops upon redirect to nonsense URL
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
NEW
People
(Reporter: zwol, Unassigned)
Details
If you try to load a URL which performs a 3xx redirect to a profoundly invalid URL, page load will just stop; no error is displayed.
STR:
* Open a new tab and navigate to about:blank.
* Open the network monitor.
* Type http://httpbin.org/redirect-to?url=http://@ into the location bar and press Return.
* The location bar will change to reflect the above URL, but the page content area will remain blank. The network monitor will show a single GET.
* Clicking on the GET will show that the browser was, in fact, redirected to "http://@".
Expected behavior:
* As above, but some sort of network error message is shown in the page content area.
Yes, this occurs in the wild: I wrote the STR above using a special-purpose site that allows you to fabricate nigh-arbitrary HTTP responses, because that will continue to work forever, but here are some URLs of apparently-real sites that right now provoke exactly this behavior (seems to be some sort of nginx misconfiguration):
* http://www.usedinasentence.com/
* http://www.lelivros.info/
and contrast
* http://wholesale-perfumes.eu/ (redirects to http://www.wholesale-perfumes[^/%5d*/wholesale-perfumes/ , which gets reinterpreted as http://www.wholesale-perfumes[^.com/%5D*/wholesale-perfumes/ and triggers a "server not found" error page).
It is possible that this belongs under Firefox or Toolkit somewhere, but I couldn't find any component that seemed to be for the error pages.
Comment 1•12 years ago
|
||
So in this case I _think_ necko sends back NS_ERROR_CORRUPTED_CONTENT. In theory. In practice, I see us keep spinning the spinnder; do you see that too?
Comment 2•12 years ago
|
||
Actually, not, NS_NewURI succeeds here and creates "http:///". Then something else down the line errors with NS_ERROR_MALFORMED_URI.
Then we land in nsDocShell::EndPageLoad get down to the "url && NS_FAILED(aStatus)" block, the status is not in that list of three we know about, URI fixup fails, it's not in the list of more statuses we know how to show an error for, and we return without doing anything.
We should probably have at least a generic error page for this case....
| Reporter | ||
Comment 3•12 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #1)
> So in this case I _think_ necko sends back NS_ERROR_CORRUPTED_CONTENT. In
> theory. In practice, I see us keep spinning the spinnder; do you see that
> too?
No, I see the spinner flash for a moment and go away. (This computer only has ff26, though, it might've changed? perhaps in Australis?)
It's maybe also worth mentioning that, for me, if I paste that httpbin.org URL into a tab that is showing something other than about:blank (e.g. about:newtab or http://some-working-site.com/) then the previous page is preserved and the location bar _reverts to the previous URL_ at the same time that the spinner goes away.
| Reporter | ||
Comment 4•12 years ago
|
||
Looks like DisplayLoadError and about:neterror already understand NS_ERROR_MALFORMED_URI -- try
data:text/html,<a href="http://@">click me</a>
The existing error page is not great, though; the text ought to change a little based on where the malformed URI came from (typed into location bar .vs. written in a hyperlink .vs. redirection)...
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•