My website is, by default, on HTTP. I do have a certificate that enables HTTPS, but only certain areas on it force a secure connection.
The login is processed via Ajax, and I want to start using SSL on that, even if the request is coming from HTTP.
I tried forcing the address for the request to have HTTPS, and it replies perfectly. However, on the ajax callback, it seems like the session was never set, despite the reply being ok.
If the request comes from HTTPS, everything goes smoothly.
Why does this happen?
I can understand why a HTTPS to HTTP request is denied by the browser, but the reverse situation (HTTP to HTTPS) has a peculiar result, to say the least, since the browser doesn't throw any kind of error. The session simply doesn't seem to have never been started after the Ajax request is done, despite all the data coming from the reply telling me it was.