moesenle / servant-websockets

BSD 3-Clause "New" or "Revised" License
22 stars 10 forks source link

Firefox won't connect with servant 0.15 #7

Closed turboMaCk closed 5 years ago

turboMaCk commented 5 years ago

Hello, I've run into the issue specific to just Firefox with servant 0.15.

This is an error is thrown in Firefox on new WebScoket()

Firefox can’t establish a connection to the server at ws://localhost:foo/bar

I've tested examples in master (using lts-9.0) and it works with servant version from this snapshot. I've tested chrome with stackage updated to lts-12.26 and this case works as well.

table of compatibility:

lts-9.0 lts-12.26
Chrome OK OK
FireFox OK broken

I have no idea what exactly this is about and how it can be fixed (at least not yet).

The issue can be tested by applying this patch https://github.com/turboMaCk/servant-websockets/commit/3b133b0c61c920fca7748d3ae45dbe8a8e181310

and following:

$ stack build
$ stack exec websocket-stream

and opening index.html in Firefox.

Firefox version: 64.0 OS: Mac/Linux (NixOS)

turboMaCk commented 5 years ago

This issue is invalid. After some investigation, I've found out that the actual issue is with some wai middleware. FF probably doesn't like some response header or so.