Closed Bug 278189 Opened 20 years ago Closed 20 years ago

Firefox randomly and frequently throws google home page and google error page while using proxy

Categories

(Firefox :: General, defect)

1.0 Branch
x86
All
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jimmywithtorch, Assigned: bugzilla)

Details

Attachments

(1 file)

I first found this bug while using google search after sharing my internet
connection using a proxy server. While using manual proxy, when I searched for
'pizza hut' and when I clicked the first search result, instead of opening
pizzahut.com it throwed google english home page. Then one by one I clicked on
each search results and every time it either throwed Google hompage (depending
on the site url. e.g. if its .com it will throw google english home page, if its
.ca it will throw google canada home page) or google error page saying "Google
error location <url path with base url dropped> not found"

Here by base url dropped I mean, if the link were www.foo.com/foo/bar it will say
"Google error location /foo/bar not found"

I thought this is only when I use google search. So I avoided using google
search. But I often faced the problem while browsing any web site normally. When
I click some link on any random website that is supposed to take more time
because of slow server, firefox will directly show that google error page. While
in the address bar I see the original link address, not google address.

To further investigate I tried this with mozilla suit and same problem occured.
Then I tried in Firefox Linux version (till now I was tryin in Windows XP), and
same problem (ofcourse with same proxy settings)

Firefox Version: 1.0
Mozilla Version: 1.7.2
OS: Windows XP, Linux (kernel 2.6)
Proxy server that I am running on my main computer is: AnalogX Proxy, Version: 4.14

My proxy settings:
HTTP   10.0.0.1 6588
SSL    10.0.0.1 6588
SOCKS  10.0.0.1 1080 (Tried v4 as well as v5)
FTP    10.0.0.1 21
I am not sure how to start reproducing this. I agree it looks like a
defect in Firefox if, when it needs to get the URL

http://pizzahut.com/foo/bar.html

is actually asks for 

http://www.google.com/foo/bar.html

If you think that this is your proxy rewriting URLs then you might want
to check the network traffic with a tool like ethereal to confirm that
Firefox is sending correct data.

You might want to try without the proxy in the picture.

You should also report the build ID of the lizard that you are having
problems with, and perhaps check with the latest nightly.

If Firefox really is having difficulty with a correctly operating proxy,
then I am sure that there is someone ready to fix the problem soonest.
Ok here is how to reproduce it:
(1) Create LAN with static ip address (without DNS and dhcp server).
(2) Share the internet connection using a proxy server.
(3) After configuring proxy settings in firefox or mozilla on the client 
computer, try browsing internet for some time. You will experience the bug.
(4) If you want to see the bug right away, open google.com and search 
anything. Then click on any of the links in search results. You will get 
google home page instead of the expected site.

I am yet not familier with tools like ethereal, but I will surely try it and 
paste the report here, if I get a hold over it.

Thought, for 70% it doesn't look like the proxy server bug. Because Internet 
Explorer and Konqueror works fine with the same proxy settings and same proxy 
server (AnalogX proxy server, 
http://www.analogx.com/contents/download/network/proxy.htm)

I will try another proxy server and report soon.
There are more details at 
http://www.mozilla.org/projects/netlib/http/http-debugging.html

Good luck!
Thanks for the link Ben.

OK. So I uninstalled my current forefox, removed firefox directory from 'Program
Files', and also removed firefox directory from 'Documents and
settings/Application data' to ensure fresh install.

Then I installed latest nightly build of firefox dated 01/16/2005. Then I
followed the steps on the link that Ben posted, and here is the log file:
http://www.iit.edu/~upadsau/moz_firefox_log_01162005.txt

I reproduced the bug during that session, summarizing what I did during the
session of log file:
(1) I opened yahoo.com and searched for 'pizzahut' there to check everything
works fine. In the serch results I clicked the first link and it worked fine.
(2) Next I opened google.com and searched for 'pizzahut' (one time I typed
something lese by mistake, so you might see that too in the log). So bug shows
up now on.
(3) I clicked the first link in the search results, pizzahut.com that redirects
me to google English home page
(4) then I clicked on pizzhut.co.uk from the search results, that redirected me
to google UK home page
(5) Then I clicked on pizzahut.ca and that redirected me to google Canada home page
(6) Then on the next page of search results I try clicking
'www.pizzahut.com/menu' that leads me to Goole error page saying:
Google Error   Not Found    The requested URL /menu/ was not found on this server

So from my observation it looks like Gecko sometimes falsely interprets
www.someurl.xxx/foo (where xxx= com, biz, ca, co.uk ect)to be
www.currenturl.xxx/foo when we click a link from 'currenturl' page.

And this has something to do with either the webserver a site is using or thier
HTML code. Because it happens to me on some websites very frequntly and I can
browse smoothly on some websites without facing the bug. e.g. as I described in
the logged session, it worked just fine when I clicked different links on yahoo
and the bug appeared evertime I clicked a link on google. 

Note: This bug is surely not google related. I have experienced it with many
other URLs with more or less frequency.
-Plus I am not affiliated with pizzahut, yahoo, google anyway those were just
examples :)
It is getting close to my bed time. 

Take a quick look through the log file with grep, and see whether
you don't think that all the lines with GET on them, the requests
that the lizard as your user agent was making, were all correct.

This is why you must consider the possibility that your proxy
(or another proxy) was re-writing the URLS or had the wrong
idea of the IP addresses of the sites your were visiting.

I would suggest that you carefully check the synchronisation
of the clocks on your machines (so you can marry up the logs),
an follow a request that gets misdirected. Does the problem
occur within Firefox - perhaps not - check with ethereal.

Does it happen inside your proxy - the logging and reporting 
there may help?

Are you able to examine the packets "on the wire" - between your proxy
and your network/hub/router/ISP?

If so, you might be able to identify where physically the problem is
happening.

Are you able to verify the DNS lookups that your client and proxy
are using and relying on?
I tried monitoring network traffic with ethereal. But after I installed
ethereal, everytime I started ethereal, my windows crashed :( So I couldn't
generate log with ethereal.

But I tried another proxy server. And firefox/mozilla works fine with the new
ftp server :) So it seems to be a bug in my old proxy. But I wonder why it
happened only with firefox and mozilla and not with IE or Konqueror.
I can confirm this.  I get the exact same set of problems using Firefox 1.0
running on Linux.   Proxy settings are 127.0.0.1 : 8000 for HTTP and SSL  

I.e., the proxy runs on the same machine and I'm quite sure it's not re-writing
URLs; I've been using this same setup with Mozilla for years
(In reply to comment #7)
> I can confirm this.  I get the exact same set of problems using Firefox 1.0
> running on Linux.   

Are you saying that there is/might be a defect in Firefox? If so, what are
the observed and expected actions. What is the recipe to reproduce.

> I've been using this same setup with Mozilla for years

Are you saying that Mozilla has been faulty for years?

(In reply to comment #8)
> Are you saying that there is/might be a defect in Firefox? If so, what are
> the observed and expected actions. What is the recipe to reproduce.

Observed actions: when, after opening a page, I type a new adddress in the
location bar, e.g. http://www.somewhere.net/foobar.html, Firefox tries
to load foobar.html from www.google.com

Expected actions: to load foobar.html correctly from www.somewhere.net

Recipe to reproduce: Manual proxy configuration, HTTP proxy on 127.0.0.1
port 8000, ditto for SSL.   (And the proxy in question is the Junkbuster).
Proxy connection options set to HTTP 1.0

> > I've been using this same setup with Mozilla for years
> 
> Are you saying that Mozilla has been faulty for years?

No; the above setup works just fine with Mozilla.
(In reply to comment #9)
> (In reply to comment #8)
> > Are you saying that there is/might be a defect in Firefox? If so, what are
> > the observed and expected actions. What is the recipe to reproduce.
> 
> Observed actions: when, after opening a page, I type a new adddress in the
> location bar, e.g. http://www.somewhere.net/foobar.html, Firefox tries
> to load foobar.html from www.google.com
> 
> Expected actions: to load foobar.html correctly from www.somewhere.net
> 
> Recipe to reproduce: Manual proxy configuration, HTTP proxy on 127.0.0.1
> port 8000, ditto for SSL.   (And the proxy in question is the Junkbuster).
> Proxy connection options set to HTTP 1.0

As comment 3 and comment 4 above, are you able to follow the debugging steps
and attach an HTTP log.
See my reply to #10
(In reply to comment #11)
> See my reply to #10

Duh, sorry about that cryptic comment.

what I meant to say: sorry it took a while to get back to this; I have reproduced
the problem with HTTP debugging turned on as you requested; details in the
attachment
O.K. Your log looks exactly as I saw in comment 5 . Does Firefox work if you
take the proxy out of the picture - this may be easy to do if it is running on 
localhost?

Does you proxy do any logging?
(In reply to comment #13)
> O.K. Your log looks exactly as I saw in comment 5 . Does Firefox work if you
> take the proxy out of the picture - this may be easy to do if it is running on 
> localhost?

Yep, bypassing the proxy makes the problem go away.  ISTR that in Mozilla I
could configure the browser to use HTTP 1.0 only (to avoid problems with the
proxy), no such option is available with Firefox -- that I could find.
 
> Does you proxy do any logging?

No.
(In reply to comment #14)
> > Does you proxy do any logging?
> 
> No.

Actually, I take that back; it does (though I've never used it)
(In reply to comment #14)
> (In reply to comment #13)
> > O.K. Your log looks exactly as I saw in comment 5 . Does Firefox work if you
> > take the proxy out of the picture - this may be easy to do if it is running on 
> > localhost?
> 
> Yep, bypassing the proxy makes the problem go away.  ISTR that in Mozilla I
> could configure the browser to use HTTP 1.0 only (to avoid problems with the
> proxy), no such option is available with Firefox -- that I could find.

O.K. 

1. Do you think that there is any defect in Firefox?
2. Do you think that it is possible to configure Firefox to do 
correctly what you want?
3. Do you think that the documentation and help for Firefox is adequate?

Ben
(In reply to comment #16)

Again, sorry for the long delay in responding.

> 1. Do you think that there is any defect in Firefox?
> 2. Do you think that it is possible to configure Firefox to do 
> correctly what you want?
> 3. Do you think that the documentation and help for Firefox is adequate?

It's the proxy that is slightly brain-dead.  Mozilla has settings (part of
preferences) to --when using a proxy-- a) disable Keep-Alive and b) use
HTTP/1.0 only.

I'd forgotten about this aspect b/c I'd been using Mozilla for so long that
it didn't immediately come to mind.

Now, when I started Firefox for the first time, it imported my Mozilla
settings; but not the aforementioned HTTP networking options.   Possibly
because Firefox does not have these settings anymore (I looked in Preferences
and could not find them).

Now then:

> 1. Do you think that there is any defect in Firefox?

The short answer --from a technical point of view-- is No.  It's the
proxy that doesn't grok current HTTP/1.1 and Keep-Alive.

Now, whether or not the absence of the features that allow use of
defective proxies can be considered a "defect" in a non-technical
sense is something for the developers to decide.  I think that in
Mozilla, those features were there b/c widespread use of these
kinds of proxies several years ago.  Whether that is still widespread or not
I don't know --thus, whether or not it's worth developer effort
to put that code back into Firefox, in order to support a possibly
smaller segment of the user base; I have no idea.

Speaking only for myself, I am looking at other proxies, but due to time
constraints it's going to take me a while before I can find and test
a new one.  I hope I do; but until that happens I'll stay with
Mozilla, b/c I really need the proxy for various reasons.

> 2. Do you think that it is possible to configure Firefox to do 
> correctly what you want?

Not as far as I can tell (see above).

> 3. Do you think that the documentation and help for Firefox is adequate?

Yes.  Since Firefox does not (apparently) have the networking options mentioned
above, the help file does not mention them; which is OK.
(In reply to comment #17)
> (In reply to comment #16)
>
> [ snip ]
> 
> > 1. Do you think that there is any defect in Firefox?
> 
> The short answer --from a technical point of view-- is No.  It's the
> proxy that doesn't grok current HTTP/1.1 and Keep-Alive.
> 
> ...

Unless this is already a Dup, then it can probably be resolved as WORKSFORME. 
I suspect that the problem is common enough that full documentation
and/or a work around (I believe that switching to HTTP 1.0 (if possible) 
when using a proxy with the characteristics you describe, is one) should be 
provided. IMHO this just the situation that Release Notes were created for. 
We should also be very sure that Firefox is keeping to the letter as well as 
the spirit of any HTTP protocol, in particular the absence of easy user-level 
configuration of HTTP 1.0 and Keep-alive.
(In reply to comment #14)
> (In reply to comment #13)
> > O.K. Your log looks exactly as I saw in comment 5 . Does Firefox work if you
> > take the proxy out of the picture - this may be easy to do if it is running on 
> > localhost?
> 
> Yep, bypassing the proxy makes the problem go away.  ISTR that in Mozilla I
> could configure the browser to use HTTP 1.0 only (to avoid problems with the
> proxy), no such option is available with Firefox -- that I could find.
>  
> > Does you proxy do any logging?
> 
> No.

I have the same problem with Firefox and AnalogX Proxy. I used "about:config"
url to change the network.http.proxy.keep-alive to false and
network.http.proxy.version to 1.0. and everything seems to works again.
Though not common enough, I think there is possibility of using this for URL
spoofing.

I don't know if such thing is possible, but if like client side proxy, if there
is also something like server side proxy then some web-server could use this for
URL spoofing.

Lets say, http://www.phishing.com/mystore.html sells his items on mystore.html
and says:
--------------------------
Item Description: blah blah....
To purchase item, go to my ebay item listing:
http://www.ebay.com/item?3344
--------------------------

Now that guy knowingly sets his webserver through a proxy (I don't know if this
is possible, I am just showing a possiblity) that uses old protocol HTTP 1.0, so
that whenever someone clicks on http://www.ebay.com/item?3344, Firefox takes him
to http://www.phishing.com/item?3344

and thus he illudes the customer as if he were purchasing from ebay, while he is
actually purchasing from the same phishing.com URL.

Here its worth noticing that, Firefox will still show
'http://www.ebay.com/item?3344' in the addressbar, even if ifrefox opened
'http://www.phishing.com/item?3344'

Thats what happed to me while experiencing this problem.
i.e. When from search.google.com I cliked pizzahut.com/menu
it took me to google.com/menu while in the addressbar it still showed
pizzahut.com/menu
type about:config in the URL bar
set network.http.proxy.version to 1.0
should work just like changing that pref in Mozilla.

This isn't a pref that a casual user will understand or need without being told
about it, so it doesn't and won't have UI.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: