Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(aws-lambda) strip headers that are disallowed by HTTP/2
We currently access Lambda over HTTP/1.1, and it returns a Connection header as such. The Connection header is not used in HTTP/2 (it is superseded by other protocol features) and including it violates RFC 7540 8.1.2.2. Per the same "an intermediary transforming an HTTP/1.x message to HTTP/2 will need to remove any header fields nominated by the Connection header field, along with the Connection header field itself.", we also remove additional headers. Lambda does not currently emit these, and the RFC indicates it's not strictly necessary to strip them unless they're nominated by Connection, but their presence will break some HTTP/2 implementations (libcurl and Chrome at least, possibly others), so stripping them is future-proof against Lambda adding them in the future. From #4032
- Loading branch information