sta / sta/websocket-sharp

The header part of a frame cannot be read from the data source on FireFox

Open
#132 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hello, I saw that this problem has occurred before, but none of the solutions worked out.
The does not occur when using Chrome, only in FireFox.
Confirmed that it does work in Chrome and IE but not in FireFox 38.0.1

fun fact, it does work on older FireFox versions (tested on an v28 installation)
So there must be something changed in firefox that makes the code incompatible.

I'm not using SSL and using JavaScript to connect to the server.

The code I used to test for this example is the default Example 3 from the git.
Full error log:
25/05/2015 11:07:25|Debug|WebSocket.acceptHandshake:577|A connection request fro
m 127.0.0.1:57781:
GET /Echo HTTP/1.1
Host: localhost:4649
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.
0) Gecko/20100101 Firefox/38.0
Accept: text/html,application/xhtml+xml,application/xm
l;q=0.9,/;q=0.8
Accept-Language: nl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Sec-WebSocket-Version: 13
Origin: http://192.168.1.33:4649
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: Q6SB9LZzhtdXHM214uIogw==
Connection: keep-alive, Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
25/05/2015 11:07:25|Debug|WebSocket.sendHttpResponse:1350|A response to this req
uest:
HTTP/1.1 101 Switching Protocols
Server: websocket-sharp/1.0
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: KRvpZEmNqH0EJfXXhrXMolFJELM=
Sec-WebSocket-Extensions: permessage-deflate; client_n
o_context_takeover; server_no_context_takeover
25/05/2015 11:07:25|Fatal|WebSocket.processException:1005|WebSocketSharp.WebSock
etException: The header part of a frame cannot be read from the data source.
bij WebSocketSharp.WebSocketFrame.<>c__DisplayClass
7.b__6(Byte[] header) in d:\PROGRAMMING\Gwent_Online\BACKEND\WebSocke
t\websocket-sharp-master\websocket-sharp\WebSocketFrame.cs:regel 567
bij WebSocketSharp.Ext.<>c__DisplayClass6.b__5(IAsyncResult ar) in d:\PROGRAMMING\Gwent_Online\BACKEND\WebSocket\we
bsocket-sharp-master\websocket-sharp\Ext.cs:regel 689
25/05/2015 11:07:25|Trace|WebSocket.close:680|Begin closing the connection.
25/05/2015 11:07:25|Debug|WebSocket.closeHandshake:723|Was clean?: False
sent: False
received: True
25/05/2015 11:07:25|Trace|WebSocket.close:687|End closing the connection.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the repository's default Example 3 in Firefox 38, comparing it with Chrome, IE, and the older Firefox version mentioned. Read websocket-sharp/WebSocketFrame.cs around line 567 and Ext.cs around line 689, using the supplied handshake and exception log to trace why the frame header is not read. Done means the example connects and operates correctly in the affected Firefox version without regressing the other browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.