Comment 15 for bug 84242

Revision history for this message
In , Ineluki (ineluki) wrote :

Confirmed as recently as 8.0beta3 and 7.0.1 release. Fully reproducible with the steps mentioned above.

Tested in Windows XP, but as far as I know, this is architecture independent, and has to do with the way Firefox works when you use a single word in the URL bar, i.e.: word

- Firefox will try to download it the http://word URL:

GET / HTTP/1.1
Host: word

- if it doesn't work (e.g. it won't resolve to a local hostname or an IP address), it will result in a search.

Problem: when there's a proxy, the proxy answers the query with an error page. Instead of the 504 error page (gateway timeout), it uses a 403 error (forbidden). Since that is a final error, Firefox no longer tries, and search is never invoked.

e.g. full interchange (with nonrelevant headers edited out)

GET http://word/ HTTP/1.1
Host: word
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
DNT: 1
Proxy-Connection: keep-alive
Cache-Control: max-age=0

HTTP/1.1 403 Forbidden
Content-Length: 456
<html><head><title>504 DNS look up failed</title></head><body><font size=2><table width="100%"><tr><td bgcolor=#3300cc align="center" colspan=2><font color=#ffffff><b>504 DNS look up failed</b></font></td></tr></table><br><br>The webserver for http://word reported that an error occurred while trying to access the website. Please click <u><a href="javascript:history.back()">here</a></u> to return to the previous page.<br><br><hr></font></body></html>

i.e. even if the proxy's error page says it's a 504 error, the actual error code returned is 403 ("Forbidden"), so Firefox does the right thing and doesn't do anything else.

It's the proxy's fault, but it's still very annoying and I wonder if there could be a way for Firefox to handle this more gracefully.