Skip to content

[websocket] Message get lost when Netty's read the Handshake and First message in single Selector read #471

Closed
@jfarcand

Description

@jfarcand

If Netty/the NIO Selector reads the following message in a single read

T 127.0.0.1:8080 -> 127.0.0.1:51295 [AP]
HTTP/1.1 101 Switching Protocols.
Upgrade: websocket.
Connection: Upgrade.
Sec-WebSocket-Accept: mFFTAW8KVZebToQFZZcFVWmJh8Y=.
                                 .

T 127.0.0.1:8080 -> 127.0.0.1:51295 [AP]
.21808c569-099b-4d8f-b657-c5965df40449|1391270901601

The 21808c569-099b-4d8f-b657-c5965df40449|1391270901601 won't be decoded by Netty's Decoder and will get lost. The workaround is to add a whitespace payload between the handshake's headers and the first websocket message.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions