-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug where duplicate headers were lost in passthrough when using H2
Previously, if a client connected with HTTP/2, a request was proxied, and the response contained duplicated headers (e.g. multiple set-cookie headers) then all but the last header value was lost. This is due to a bug in Node's HTTP/2 compatability layer, which will be fixed separately. In the meantime, this patch should let us work around the issue with minimal impact. This patch works by collapsing raw headers back to an object. The only situation where this will reorder or lose header info is for duplicate headers, which are conveniently broken by this bug already. Other raw header cases like key-casing don't matter for H2 because it enforces lowercase keys regardless.
- Loading branch information
Showing
2 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters