Skip to content

x/net/http2: rename and export Transport's t1 field #16581

Open
@mna

Description

@mna

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?

    go version go1.7rc4 darwin/amd64

  2. What operating system and processor architecture are you using (go env)?

    GOARCH="amd64"
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOOS="darwin"

  3. What did you do?

    Directly use an http2.Transport to set its AllowHTTP field to true, to enable HTTP/2 over HTTP (and set DialTLS accordingly, as mentioned here: x/net/http2: support h2c for http2 #14141 (comment)).

  4. What did you expect to see?

    Have access to the same rich set of configuration options as are available on http.Transport.

  5. What did you see instead?

    Many configuration options from http.Transport are not available on http2.Transport (e.g. controlling idle connections in the ClientConnPool).

As discussed on golang-dev mailing list (https://groups.google.com/forum/#!topic/golang-dev/HmqDsLpTywk), as it currently stands, if we have to directly use the http2.Transport, we have to give up on a number of configuration options that are present only on http.Transport. @bradfitz suggested to rename and export the http2.Transport.t1 field to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions