I don't know if it's still the case, but it used to be that if you accidently set a localhost webserver to redirect to HTTPS while you were developing then browsers would remember that and from then on require HTTPS for all of eternity until you could figure out how to make it stop which was mostly impossible. It ended up in some HSTS file somewhere deep in the browsers cache files. Horrible technology.