After starting simplehttp2server, the console shows Listening on :5000.... If we forget that it's serving over https and try to access a binary file gets downloaded.
Steps to Reproduce
- CD into directory containing index.html
- Run simplehttp2server.
- Browse to (instead of https).
- Server log shows full URL (i.e., Listening on
- or any of the following:
- Redirect to https (301)
- Serve the index.html (unencrypted h2 preferably, or even http/1.1)
- Display a meaningful/helpful error page
- Display a meaningful/helpful error on the terminal's server log
- Binary file is downloaded instead of a page shown in browser
- Server log emits cryptic (at least for someone unfamiliar with TLS) error:
2016/06/17 22:12:43 http: TLS handshake error from [::1]:54431: tls: first record does not look like a TLS handshake
Environmentx / Version
Operating System / OS X El Capitan
Go / go version go1.6.2 darwin/amd64
Shell / zsh
Browser / Chrome 51