spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

Listed connection headers not removed

Open motinis opened this issue 3 years ago • 0 comments

RemoveHopByHopFilter removes the connection header, but doesn't remove the listed headers in it (as it should per e.g. https://www.rfc-editor.org/rfc/rfc9110.html#name-connection or https://datatracker.ietf.org/doc/html/rfc2616#section-14.10). For example, if the header was Connection: xyz then the xyz header would need to be removed as well.

Note that the test code in RemoveHopByHopHeadersFilterTests.removesHeadersListedInConnectionHeader passes because the chosen values of upgrade and keep-alive are listed explicitly in RemoveHopByHopFilter and not because they are in the Connection header value - this is fine since those two headers need to be removed anyway per the specs (whether they are listed in connection header or not).

motinis avatar Jun 26 '22 08:06 motinis