The server has the default TLS configuration and has no timeouts set.
Which means connections can't timeout and can hang forever.
Approach
Set some best guess timeouts for reading, writing, and idle time. Set up basic TLS config.
When running in HTTPS mode, spawn an HTTP server whose sole purpose is to redirect HTTP requests to their HTTPS version.
Testing
Hit the server in HTTP mode to make sure it gets told to redirect. Haven't actually wrote anything that would connect and hang to test timeouts. Might be a good TODO.
… sure to also try to spawn an HTTP server that just redirects to HTTPS
This PR addresses the following issues:
https://github.com/ImageWare/TLSential/issues/45
Context
The server has the default TLS configuration and has no timeouts set. Which means connections can't timeout and can hang forever.
Approach
Set some best guess timeouts for reading, writing, and idle time. Set up basic TLS config. When running in HTTPS mode, spawn an HTTP server whose sole purpose is to redirect HTTP requests to their HTTPS version.
Testing
Hit the server in HTTP mode to make sure it gets told to redirect. Haven't actually wrote anything that would connect and hang to test timeouts. Might be a good TODO.