Firefox address bar search displays proxy error page for single word queries

Bug #84242 reported by Chris Smith
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Confirmed
Unknown
firefox (Ubuntu)
Triaged
Medium
Mozilla Bugs

Bug Description

The problems transpire when searching for single words using the address bar in Firefox.

When I have Firefox proxy settings set to "Auto Detect" this feature works fine.
(Q: is the proxy being used then?)

When explicitly setting the proxy settings in Firefox this fails sending me to http://query/ (displaying the proxy's error page).
It also fails, when configuring the proxy via PAC file (last option in the settings).

(Initially reported for version 2.0.0.1+0dfsg-0ubuntu0.6.10 under edgy)

TEST CASE (from comment #7):
1. Add proxy to Firefox conntections.
    - Tools > Options > Advanced > Network.
    - Click Settings under Connections.
    - Select Manual proxy configuration and enter valid proxy details to use for HTTP.
    - Apply settings.
2. Enter a search term in Firefox's address bar, e.g. "query", and press enter.

What happens in this situation is Firefox attempts to reach "http://query/", which of course is non existent.

What should happen normally is "query" is searched with Google.

Chris Smith (cs278)
description: updated
Revision history for this message
Alexander Sack (asac) wrote :

you sure you are actually using a proxy when firefox is in "Auto Detect" mode?

Changed in firefox:
assignee: nobody → mozillateam
status: Unconfirmed → Needs Info
Revision history for this message
Chris Smith (cs278) wrote :

Yeah, all www traffic leaving that is not sent by the web proxy is rejected.

David Farning (dfarning)
Changed in firefox:
assignee: mozillateam → mozilla-bugs
Revision history for this message
Chris Smith (cs278) wrote :

I just verified this on firefox (2.0.0.3+1-0ubuntu2) and the behaviour is the same, using a clean profile with and without safe mode.

In a clean profile type "query" into the address bar, you will be redirected to <http://en.wikipedia.org/wiki/Query>

Now go to the proxy settings, and setup a proxy for HTTP and repeat. You are sent to <http://query/>

I have used both Squid and Tinyproxy to test this, Tinyproxy log appears to show that Firefox doesn't even talk to google:

CONNECT Apr 19 14:57:00 [17950]: Connect (file descriptor 7): ktulu [192.168.0.3]
CONNECT Apr 19 14:57:00 [17950]: Request (file descriptor 7): GET http://query/ HTTP/1.1
INFO Apr 19 14:57:00 [17950]: No proxy for query
ERROR Apr 19 14:57:00 [17950]: opensock: Could not lookup address "query".
INFO Apr 19 14:57:00 [17950]: Not sending client headers to remote machine

Revision history for this message
Alexander Sack (asac) wrote :

this bugs lacks a step-by-step instruction on how to reproduce.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

we are lacking information that would help us in pinpointing the problem. Furthermore, the report is against a very old version of Firefox in a release that is no longer supported. I am closing this report. Feel free to reopen this tracker or open a new one with the requested information if you can still reproduce this.

Changed in firefox:
status: Incomplete → Invalid
Revision history for this message
Miguel Angel (miguelpedregosa) wrote :

The problems transpire when searching for single words using the address bar in Firefox.

When I have Firefox proxy settings set to "Auto Detect" this feature works fine.

When I explicitly set the proxy settings in Firefox this fails sending me to http://query/

affects: firefox (Ubuntu) → firefox-3.5 (Ubuntu)
Changed in firefox-3.5 (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
In , Pichlik (pichlik) wrote :

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6

The problem occur when searching for a *single word* using the location bar and the proxy settings are "Manual proxy configuration". Firefox doesn't perform a fulltext search, but redirects directly to http://<entered word>.

Reproducible: Always

Steps to Reproduce:
1. Install a proxy server e.g. to localhost:8080
2. Change Firefox proxy settings to Manual proxy configuration and enter HTTP proxy: localhost and port:8080
3. Enter a single word into the location bar and hit enter
Actual Results:
Firefox doesn't perform a fulltext search, but redirects directly to http://<entered word>.

Expected Results:
Fulltext search for entered word.

When multiple words is entered search works fine. The exactly same problem has been descibed here https://launchpad.net/ubuntu/+source/firefox-3.5/+bug/84242

Revision history for this message
Ben Schutz (btwschutz) wrote :

To reproduce bug:
1. Add proxy to Firefox conntections.
    - Tools > Options > Advanced > Network.
    - Click Settings under Connections.
    - Select Manual proxy configuration and enter valid proxy details to use for HTTP.
    - Apply settings.
2. Enter a search term in Firefox's address bar, e.g. "query", and press enter.

What happens in this situation is Firefox attempts to reach "http://query/", which of course is non existent.

What should happen normally is "query" is searched with Google.

Revision history for this message
drew212 (mstngdrew212) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.There have been many changes in Ubuntu since that time of the original report and your problem may have been fixed with some of the updates. It would help us a lot if you could test the current Ubuntu development version (10.10). If you can test it, and it is still an issue, we would appreciate if you could upload updated logs by running apport-collect 84242, and any other logs that are relevant for this particular issue.

Changed in firefox-3.5 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Ian Roberts (teamfold) wrote :

I get this bug with my mac and Snow leopard so not sure its a ubuntu problem.
Only arrived here from google....

Revision history for this message
Ian Roberts (teamfold) wrote :
Revision history for this message
In , Ian Roberts (teamfold) wrote :

Also getting this problem with Mac OS X on my Macbook.

Revision history for this message
In , Ian Roberts (teamfold) wrote :

And also Firefox 4 Beta. Sorry bit new not sure if I can update this page or how to do so. Still finding my way around.

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.

Revision history for this message
In , Joehakimrahme (joehakimrahme) wrote :

I get the same problem with Firefox 20.0 on Mac OS X 10.8.3.
Any chance someone's working on it?

Revision history for this message
In , Shane (shane-shanekillian) wrote :

Still occurring with Firefox 22.0. Anyone?

Revision history for this message
In , Aman Shah (amanforindia) wrote :

Yep still occurs with me

Revision history for this message
In , A7106623 (a7106623) wrote :

(In reply to Shane Killian from comment #5)
> Still occurring with Firefox 22.0. Anyone?

Yes and pretty annoying.

Android -> Firefox 22 -> Proxy Mobile 0.0.10 (FF Add-on) -> Tor-Proxy (Orbot App)

Revision history for this message
In , Alexandra-lucinet (alexandra-lucinet) wrote :

*** Bug 625360 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Alexandra-lucinet (alexandra-lucinet) wrote :

Mozilla/5.0 (X11; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0

Reproducible with latest Nightly (Build ID: 20130811030225) when using a proxy server.

Here is what I get in the error console:

Request URL: http://test/
Request Method: GET
Status Code: HTTP/1.1 403 Forbidden
Request Headers
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Host: test
Connection: keep-alive
Accept-Language:en-US,en;q=0.5
Accept-Encoding:gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Revision history for this message
In , Shane (shane-shanekillian) wrote :

Temporary workaround: if you put the single word in quotes, it does the search instead of asking the proxy.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Re-opening. Still an issue with Firefox 24.

affects: firefox-3.5 (Ubuntu) → firefox (Ubuntu)
Changed in firefox (Ubuntu):
importance: Undecided → Medium
status: Invalid → Triaged
description: updated
tags: removed: mt-needtestcase
summary: - Firefox address bar search broken using proxy
+ Firefox address bar search displays proxy error page for single word
+ queries
Daniel Hahler (blueyed)
description: updated
Changed in firefox:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Josh Matthews (joshmatthews) wrote :

*** Bug 861509 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Saurabh Anand (saurabhanandiit) wrote :

I'm also facing it (and a lot of my friends at college are too since our college provides internet behind a proxy). Would really appreciate if this gets fixed.

Revision history for this message
Saurabh Anand (saurabhanandiit) wrote :

I'm still facing this issue on Firefox 28.0a1. Really want this to be fixed :)

Revision history for this message
In , Saurabh Anand (saurabhanandiit) wrote :

Can we get someone to look at this please?

Revision history for this message
In , Saurabh Anand (saurabhanandiit) wrote :

As dolske said, the fix should be located in http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp particularly the stuff involved with ALLOW_THIRD_PARTY_FIXUP in it. dolske took a dab at it here : https://bugzilla.mozilla.org/show_bug.cgi?id=836750

Revision history for this message
In , Shane (shane-shanekillian) wrote :

Thanks for the link, Saurabh, but I don't think it would fix this particular issue as the user isn't brought to a Firefox error page, but one created by the proxy server. To fix this bug, the browser must know in advance that it isn't a proper URL (i.e., doesn't end in ".com" or any other TLD, etc.) and that it should go ahead and send it to the default search engine instead of the proxy server, just the way it does with multi-word searches.

The problem seems to be that Firefox is just assuming that any single word typed into the Address Bar is a URL to be sent to the proxy, instead of checking it first.

Revision history for this message
In , Manishearth (manishearth) wrote :

This might be a non bug. Certain proxies add domains (including new TLDs) for "internal" URLs, so the location bar shouldn't be interfering. Since the proxy is returning an error page with content (and possibly with the wrong error code), Firefox can't simply hide the error page and move on to search.

Revision history for this message
Loïc Guzzetta (loic-guzzetta) wrote :

Still an issue with Firefox 30.

Revision history for this message
In , Loïc Guzzetta (loic-guzzetta) wrote :

Still an issue with Firefox 30.

Revision history for this message
In , Christin-livine (christin-livine) wrote :

In my case, but the problem may be different.
On Windows 7 64 bits French.
With proxy.
Open Firefox.
When enter one word in the search bar.
Search is doing, you can see this on the tab. No results appear. And the windows for login/password for proxy didn't appear.
Saw this problem many times with Firefox 28.0, but haven't seen yet with the newest version.

This problem can be solved temporarily by deleting the Firefox directory in C:\Users\xxx\AppData\local\, maybe the cache directory. Deleting cache with the Firefox menu is not enough.

Revision history for this message
In , Christin-livine (christin-livine) wrote :

About comment 18. I wrote it.
Mmmh, seems this not the same problem, because the problem problem discribed in comment 18 doesn't affect Firefox 5, 9, 10, 18.

Sorry for the inconvenience.

Changed in firefox:
status: Confirmed → Unknown
Changed in firefox:
status: Unknown → Confirmed
Changed in firefox:
importance: Medium → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.