ability to serve both HTTP and HTTPS on the same port #121
Closed
Description
Consider the use case of an HTTPS server which is not running on port 80 or 443.
If a user connects using HTTP, the connection hangs since the server is listening for the HTTPS protocol only. A more ideal scenario would be sending an HTTP response redirecting them to use the HTTPS protocol instead.
It's possible to serve both HTTP and HTTPS on the same port. A TLS handshake record starts with byte 22, so you can use that to determine which protocol the client is trying to speak.
io.js's internal HTTP(S) parser(s) should incorporate this into their state machine and expose this API.
See andrewrk/groovebasin#401 for an example use case.
See also http://stackoverflow.com/questions/22453782/nodejs-http-and-https-over-same-port/23975955
Metadata
Assignees
Labels
No labels
Activity