Ticket #436 (closed enhancement: invalid)
http to https redirect for secure notebook
| Reported by: | nbruin | Owned by: | boothby |
|---|---|---|---|
| Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
| Component: | notebook | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | |
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
Suppose a secure notebook is run on localhost:8000. Then presently, one has to type the URL https://localhost:8000. Would it be possible to let port localhost:8000 respond to plain http requests with a redirect to https://localhost:8000 ? The advantage is that browsers like firefox complete localhost:8000 to http://localhost:8000, and a lot of users (well, at least me) are used to this shortcut.
Change History
comment:2 Changed 5 years ago by was
I tried several times to figure out how to do this and couldn't. SO, please figure out how to do it and post a patch!
comment:4 Changed 3 years ago by boothby
This is a limitation of protocols / browsers. Since HTTPS is merely HTTP over an SSL connection, a plaintext HTTP request looks like garbage to a HTTPS server and vice verse. If your browser was smart enough to attempt to use SSL, that'd be fine. However, we can't do this in Twisted because we only take one port -- an inbound connection is silently dropped by SSL, and Twisted never hears about it. If we go to a two-port system, e.g. port 80 for http and 443 for https, then we'd be in business. And perhaps that functionality should be implemented.
However, the issue of "user connects to port x with wrong protocol" is never going to go away.

Hello,
now that Sage defaults to https this might be a good idea to implement.
Cheers,
Michael