You have to depend on golang.org/x/net/http2 to opt in 

https://github.com/davecheney/httpstat/blob/master/main.go#L252

On Wednesday, 26 October 2016 03:46:31 UTC+11, Moshe Litvin wrote:
>
> The code in net/http/transport.go (onceSetNextProtoDefaults) contain:
>
>  if t.TLSClientConfig != nil || t.Dial != nil || t.DialTLS != nil {
>  // Be conservative and don't automatically enable
>  // http2 if they've specified a custom TLS config or
>  // custom dialers. Let them opt-in themselves via
>  // http2.ConfigureTransport so we don't surprise them
>  // by modifying their tls.Config. Issue 14275.
>  return
>  }
>
>
> Stating that if you did something non-standard in the dialer or TLS you 
> don't get http2 by default.
>
> But the suggested opt-in methods does not exist (was replace by the 
> non-public http2ConfigureTransport.
>
> The net/http documentation only specify opting out, but is there a way to 
> opt-in?
>
> Moshe
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to