Hello, I am using netty to implement a websocket server. The server needs to work with some old websocket clients libraries (written in other languages) out there which does not honour the HTTP header case insensitivity rule. I am facing a problem there.
My inbound channel pipeline is pretty standard which looks like following HttpServerCodec -> HttpObjectAggregator -> HttpRequestBuilder ->WebSocketServerProtocolHandler -> WebSocketFrameAggregator -> CustomHandler In netty version 4.1.23.Final I see that the websocket handshake response being sent to client is all in lowercase header names, like following. upgrade: websocket\r\n connection: upgrade\r\n sec-websocket-accept: hex-values=\r\n But the older websocket client expects the header in the following format. Upgrade: websocket\r\n Connection: Upgrade\r\n Sec-WebSocket-Accept: hex-values=\r\n As a result the websocket connection does not complete. Has anybody faced this problem? The header strings are coming from HttpHeaderNames class instead of HttpHeader class. The fix is to change WebSocketServerHandshaker13.newHandshakeResponse() to use the required HttpHeader. But that would need change in netty code itself probably . Can somebody suggest any cleaner way to get around this problem without changing netty code? 1. Is there anyway to add/modify http response header while using the existing netty websocket handshaker classes? 2. Should I write custom WebSocketServerProtocolHandler to achieve the same? 3. Any other way? Appreciate any response!!! Thanks much in advance. Subhadeep -- You received this message because you are subscribed to the Google Groups "Netty discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/netty/3754289e-10f3-4a32-bc94-a27435e341cf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
