Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-TLS HTTP/2 (i.e. H2C) #1968

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions js/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ func (r *Runner) newVU(id int64, samplesOut chan<- stats.SampleContainer) (*VU,
MaxIdleConnsPerHost: int(r.Bundle.Options.BatchPerHost.Int64),
}
_ = http2.ConfigureTransport(transport)
http2Transport, err := http2.ConfigureTransports(transport)
Comment on lines 199 to +200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't call both http2.ConfigureTransport() and http2.ConfigureTransports(), they do the same thing.

Suggested change
_ = http2.ConfigureTransport(transport)
http2Transport, err := http2.ConfigureTransports(transport)
http2Transport, err := http2.ConfigureTransports(transport)

Also, you may have to pass the http2Transport as the VU.Transport below, though I'm not completely sure about that... 🤷‍♂️

http2Transport.AllowHTTP = true
http2Transport.DialTLS = func(network, addr string, cfg *tls.Config) (net.Conn, error) {
return net.Dial(network, addr)
}

cookieJar, err := cookiejar.New(nil)
if err != nil {
Expand Down