-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Force http/1.1 for upgrade (Traefik v1) #6553
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-Authored-By: mpl <mathieu.lonjaret@gmail.com>
Co-Authored-By: mpl <mathieu.lonjaret@gmail.com>
Tested and validated. Thanks @juliens 👍 |
server.defaultForwardingRoundTripper = transport | ||
server.defaultForwardingRoundTripper, err = newSmartRoundTripper(transport) | ||
if err != nil { | ||
log.Errorf("Failed to create HTTP transport: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really an error we can proceed on? That is unrelated to this PR (it has always just swallowed this error) but it seems strange that an HTTP proxy ignores an error in setting up its transport and proceeds without one.
What does this PR do?
This PR force the use of http1.1 with the backend when the request is a
Connection:Upgrade
becauseConnection: Upgrade
is not valid for http2.Motivation
Some kubernetes api server refuse http2 during tls-alpn (like k3s) but some other just don't (like kind) and so, SPDY upgrade fails. This PR fixes this behavior.
Fixes #6527
More
- [ ] Added/updated tests- [ ] Added/updated documentation