netty5/codec-http/src/main
Andrey Mizurov f40b4f15a6
Override Sec-WebSocket-Protocol websocket handshake response header after custom headers to avoid duplication (#10793)
Motivation:

According rfc (https://tools.ietf.org/html/rfc6455#section-11.3.4), `Sec-WebSocket-Protocol` header field MUST NOT appear
more than once in an HTTP response.
At the moment we can pass `Sec-WebSocket-Protocol`  via custom headers and it will be added to response.

Modification:

Change method add() to set() for avoid duplication. If we pass sub protocols in handshaker constructor it means that they are preferred over custom ones.

Result:

Less error prone behavior.
2020-11-19 09:49:44 +01:00
..
java/io/netty/handler/codec Override Sec-WebSocket-Protocol websocket handshake response header after custom headers to avoid duplication (#10793) 2020-11-19 09:49:44 +01:00
resources/META-INF/native-image/io.netty/codec-http Enable nohttp check during the build (#10708) 2020-10-23 14:44:18 +02:00