The following code works on Linux(docker golang:latest) but not with Windows 8.1:
package main
import (
"net/http"
"fmt"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi %s!", r.URL.Path[1:])
}
func main() {
m := http.NewServeMux()
m.HandleFunc("/", handler)
http.ListenAndServeTLS(":443", "ssl/localhost.cert", "ssl/localhost.key", m)
}
On Windows, the server returns a 403 status code. No error on server side.
go version
go1.6 windows/amd64
Certificate is generated using http://www.selfsignedcertificate.com/
What i'm doing wrong ?