question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate Sec-WebSocket-Protocol headers in response

See original GitHub issue

Potential bug with websockets response. I get 2x Sec-WebSocket-Protocol headers in response if I open websocket with a protocol parameter in JS like this var socket = new WebSocket("ws://localhost:9000/ws", "some-arbitrary-text");

Lagom 1.5.1 Typical bidi streaming service signature: def stream(): ServiceCall[Source[String, NotUsed], Source[String, NotUsed]]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kotdvcommented, Jul 29, 2019

Chrome throws a console error about that behavior (duplicate headers) and websocket client dies. So it’s kind of blocking issue really.

play2.js:74 WebSocket connection to 'ws://localhost:9000/ws' failed: Error during WebSocket handshake: 'Sec-WebSocket-Protocol' header must not appear more than once in a response

0reactions
ihostagecommented, Apr 1, 2021

Yes. This fix not backported to 1.6.X. I think we can do that. @octonato WDYT?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Protocol upgrade mechanism - HTTP - MDN Web Docs - Mozilla
The server's response's Sec-WebSocket-Accept header will have a value computed based upon the specified key .
Read more >
Duplicating Request Headers from Android Packets to ...
I am trying to connect to a WebSocket server that my Android device connects to from an app. I captured the packets on...
Read more >
How decided a value set in Sec-WebSocket-Key/Accept ...
When WebSocket handshaking, client uses Sec-WebSocket-Key header and server uses Sec-WebSocket-Accept header. The algorithm to create values set ...
Read more >
Network/WebSockets.hs
currently doesn't implement the entire WebSocket protocol, ... stopping when -- it encounters an unrecognized header key, duplicate header keys -- or an ......
Read more >
WebSockets header issue
GoError: websocket: duplicate header not allowed: Sec-Websocket-Key Run at go.k6.io/k6/js/modules/k6/ws.(*WS).Connect-fm (native).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found