Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Learn More

Firefox Automatically Redirecting from HTTP to HTTPS [Resolved]

  • 5 απαντήσεις
  • 1 έχει αυτό το πρόβλημα
  • 11 προβολές
  • Τελευταία απάντηση από jscher2000 - Support Volunteer

more options

I just hit a bug in Firefox that was a real time eater for me.

Firefox was automatically redirecting to https for a website even when I typed in the full url http://192.168.138.210:80. It would always redirect even if there was no server listening at port 80! Even, if I added query parameters like ?q=123456, it still did it.

I had set up the web server to listen on port 80 at 192.168.138.210 and I could never get firefox to load the http page. I created a simple node http server and the same issue occurred. I finally realized that it was the browser was doing the https redirect. I disabled all extensions and it still occurred. I tried `Private Window` and the issue went away. Chrome was fine. I also tested `wget` and it was fine.

Once I realized the Firefox profile was the issue, I then cleared the cache in the browser and presto, problem went away.

I cannot repeat this error in Firefox so a Bug report is probably not warranted. In hindsight, I should have made a copy of the profile :(

Hope this information helps someone else avoid the pain of this and also a simple warning to those testing new web servers, don't assume any complex web browser is doing the right thing, use simple tools like wget or netcat to see whats going on at the lowest possible level before passing blame.

Here are a couple of goto *nix tests I have used:

Netcat trick to send a request to http://192.168.138.210:80/ % printf "GET / HTTP/1.0\r\n\r\n" | nc 192.168.138.210 80

Handy wget script that gives all the necessities of more complex calls like https for troubleshooting certificate resolution etc.: % curl -v -I --insecure https://google.com 2>&1 | egrep -v '^> |^< |^{|^}|^* T|^* AL|^ 0'

I just hit a bug in Firefox that was a real time eater for me. Firefox was automatically redirecting to https for a website even when I typed in the full url http://192.168.138.210:80. It would always redirect even if there was no server listening at port 80! Even, if I added query parameters like ?q=123456, it still did it. I had set up the web server to listen on port 80 at 192.168.138.210 and I could never get firefox to load the http page. I created a simple node http server and the same issue occurred. I finally realized that it was the browser was doing the https redirect. I disabled all extensions and it still occurred. I tried `Private Window` and the issue went away. Chrome was fine. I also tested `wget` and it was fine. Once I realized the Firefox profile was the issue, I then cleared the cache in the browser and presto, problem went away. I cannot repeat this error in Firefox so a Bug report is probably not warranted. In hindsight, I should have made a copy of the profile :( Hope this information helps someone else avoid the pain of this and also a simple warning to those testing new web servers, don't assume any complex web browser is doing the right thing, use simple tools like wget or netcat to see whats going on at the lowest possible level before passing blame. Here are a couple of goto *nix tests I have used: Netcat trick to send a request to http://192.168.138.210:80/ % printf "GET / HTTP/1.0\r\n\r\n" | nc 192.168.138.210 80 Handy wget script that gives all the necessities of more complex calls like https for troubleshooting certificate resolution etc.: % curl -v -I --insecure https://google.com 2>&1 | egrep -v '^> |^< |^{|^}|^* T|^* AL|^ 0'

Όλες οι απαντήσεις (5)

more options

Firefox automatically redirects to HTTPS, not sure why it did it then however...

more options

@nutdriver716 - I just did some testing with node.js and Firefox just to double check. Firefox did not redirect to HTTPS regardless of whether there was HTTP server listening on the port or not.

My understanding is that Vanilla Firefox (no extensions) will assume HTTPS if the supplied URL does not include the protocol. For example, given a URL of `192.168.138.210:80/` Firefox will assume `https://192.168.138.210:80/` but for a given URL of `http://192.168.138.210:80/` Firefox should not redirect to HTTPS. Only the web server should have authority to do any protocol redirects.

more options

tim.c.quinn said

I tried `Private Window` and the issue went away. ... Once I realized the Firefox profile was the issue, I then cleared the cache in the browser and presto, problem went away.

Firefox does store and will follow redirects in the web cache. However, it's difficult to imagine where the redirect came from in the first place if not from the web server itself. Maybe a proxy?

more options

The original web configuration did have a redirect and I nuked the web server configuration and went back to default so the redirect was originally expected but after the web server config was reset, I expected it to clear any possible redirects.

The requests were going through a vanilla squid HTTP proxy. Would a vanilla squid HTTP proxy cache redirects and if so, why would clearing the cache in the browser correct the issue?

I did not touch the proxy config or or clear its caching during my issues although I did bounce the service several times to verify its functionality.

more options

I'm not familiar with squid proxy. Since the server was sending a redirect before, that is the most likely source of the cached redirect.