-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Closed
Copy link
Labels
Description
The proxy currently will always strip connection, and any headers that header mentions (so, connection: upgrade will mean both connection and upgrade are removed). However, there are a couple of other headers which are considered to apply at the connection level and thus are illegal in HTTP2 that won't be removed. This results in an h2 user error, and will mean the request fails with a 500.
These headers are:
connectiontransfer-encodingproxy-connectionupgradekeep-alive
The connection (and its related headers) are already handled, and there's a fix for transfer-encoding, but proxy-connection (and upgrade or keep-alive that somehow aren't named in a connection header) will make it by, and result in a failed request internally. Some possible solutions:
- Increase the list of headers which are always stripped for all HTTP/1 requests. This is the least complex.
- When doing the
orig-protoupgrade, remove the extra headers and put synthetic replacements with new names, which are then translated back into the originals. This way preserves some of these headers, but I'm not convinced they actually should be at all, and is more complex. - Make requests with these headers not eligible for
orig-prototranslation. This seems unfortunate, but would be more compatible and less complex than the translation option.
Reactions are currently unavailable