netty: Websocket connections fails when headers are case sensitive
Trying to access a third party web application having websocket connections through spring cloud gateway
All http requests are success but websocket connections fails with io.netty.handler.codec.http.websocketx.WebSocketClientHandshakeException: Invalid handshake response getStatus: 404
While examining the packets observed that request headers are sent in lower case letters (upgrade, connection and sec-websocket-key) from netty > io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13
headers.set(HttpHeaderNames.UPGRADE, HttpHeaderValues.WEBSOCKET).set(HttpHeaderNames.CONNECTION, HttpHeaderValues.UPGRADE).set(HttpHeaderNames.SEC_WEBSOCKET_KEY, key);
Unfortunately the third party web application I am trying to access is expecting case sensitive headers. Is there a way I can override these headers?
Netty version : reactor-netty 1.0.8
JDK 1.8
OS : Ubuntu 20.04
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (8 by maintainers)
In my opinion the third party component that violates the RFC should be fixed
@Jerry29 You should report this issue to the broken third party application so they fix it instead of trying to fork the valid implementation in Netty.
Drop me an email. Lemme help you of-the-track. 😃
@violetagg I raised a different issue for that https://github.com/spring-cloud/spring-cloud-gateway/issues/2289