levelrin / jws-server

A framework for WebSocket server in Java
MIT License
0 stars 0 forks source link

Support duplicated header names during the opening handshake #48

Closed levelrin closed 3 years ago

levelrin commented 3 years ago

We may have duplicated header names such as Sec-WebSocket-Extensions. The following must be true:

Sec-WebSocket-Extensions: foo Sec-WebSocket-Extensions: bar; baz=2

is exactly equivalent to

Sec-WebSocket-Extensions: foo, bar; baz=2

The duplicated header name can be combined into one, in which the values are separated by commas. The order matters. The first value should come first, and the second value should come after by a comma.