-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
net/http: ConfigureTransport does not work for Transport with custom DialTLS #41236
Comments
I spent some time looking through the code to find why this happens. The code splits here for custom and non-custom DialTLS. In your example, the custom DialTLS is indeed called, but 1) fails to set up the I'll leave it for more experienced people to chime in, on whether it's a bug; I understand it might be a little disorienting though. Extra noteTaking a step back I noticed that the custom DialTLS that HTTP/1.1 and HTTP/2.0 are not compatible with each other. In HTTP/1.1,
In HTTP/2.0 though,
|
so, I added
which I think is caused by the server replying with an http2 response while it is expecting an http/1.1 response After setting the uTLS
goTLS
After more looking into, I found the issue in |
/cc @FiloSottile |
I believe this is WAI actually because the custom https://go.dev/play/p/KXWWjY3gpM1 is the fixed version |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm trying to use a custom dialtls function with http.Transport in order to have flexible support for both HTTP/1.1 and HTTP2 but it seems it's just ignoring my call to http2.ConfigureTransport and all requests go over http/1.1
https://play.golang.org/p/QmEwSz3LN_l
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: