gohttp
gohttp copied to clipboard
Support HTTP2
go 1.6 support HTTP2.
Can you make it working with HTTP2?
@item4 I'm sorry, I don't know much about HTTP2, but pay attention to that
"Go1.6addstransparentsupportinthenet/httppackageforthenewHTTP/2protocol. Go clients and servers will automatically use HTTP/2 as appropriate when using HTTPS"
Need a further confirmation that Go 1.6 net/http just only support HTTP2 when using HTTPS?
I don't know much about HTTP2 too and I don't know about golang too :( But, I love this program for testing static web, so I searched some informations.
From this article, we can know we can apply HTTP2 simply with http2.ConfigureServer(srv, &http2.Server{})
.
I think(just think) we can use it at this line with some modification.
srv = &http.Server{
Addr: addr,
}
http2.ConfigureServer(srv, &http2.Server{})
// make self-signed cert (how?)
log.Fatal(srv.ListenAndServeTLS("server.crt", "server.key"))