Ratchet refuses duplicate HTTP request "Connection: Upgrade" headers
I'm not actually sure how this precise header may be specified more than once, as far as standards are concerned.
However, for some reason, the "uwsc" utility present in Debian, originating from https://github.com/babelouest/ulfius does send it twice.
While uwsc will work with other websocket servers, Ratchet refuses it by returning a HTTP 427 "Upgrade required" error code.
Maybe for compatibility sake it could be tolerated.
To reproduce:
uwsc ws://127.0.0.1:8080/
I saw the 426 error code by tcpdumping the loopback after pulling 57% of my hair out.
@quakemmo Thank you for reporting. Can you provide a HTTP request as sent by your websocket client? I'd like to get a better understanding of whether this should be reported in your client or addressed here.
Ratchet currently implements this logic: https://github.com/ratchetphp/RFC6455/blob/82760a76162a818ef14c6f78e6b96068748834d3/src/Handshake/RequestVerifier.php#L94-L107
RFC link: https://www.rfc-editor.org/rfc/rfc6455#section-4.2.1