Skip to content

x/net/http2: no way to set timeouts on http2.Transport #45574

@mhr3

Description

@mhr3

I'm using the http2.Transport with a h2c client, which works fine, but there is no way to set timeouts which are normally inherited from regular http.Transport - for example ExpectContinueTimeout, which when using manually constructed http2.Transport{} is always set to 0, and therefore the client doesn't wait for the 100-continue response.

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

$ go version
go version go1.15.2 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"

What did you do?

Sent a h2c client request with Expect: 100-continue, but the client doesn't wait to send the body because there's no way to set the ExpectContinueTimeout, which means it ends up being 0.

What did you expect to see?

There should be a way to set the timeouts, so the client would have waited to send the request body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions