New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Received illegal masked frame, using AS3WebSocket library #21
Comments
Thanks- I'll check this out and see what I can confirm. |
Confirmed that it's masking when it shouldn't; our implementation of client and server are coupled, so we'll have to do some refactoring to get this working. We're on it, though! |
+1 seems to be showing up with the latest version of Chrome (version 19). |
Thanks for the reply. It is good to hear that you're getting to fix this issue, |
+1 here. If anyone knows of a quick fix, please contact me. All of a sudden I'm getting bombarded with Chrome folk with this problem. :( |
@stuorguk you could try to use https://github.com/gimite/web-socket-js and set |
Thanks. I dont actually use the client code. Just the server side. I'm just trying to get my head around the masking to see if it's something I can disable quickly. |
Actually I have drilled-down abit to see what was happening in my case. refer to http://tools.ietf.org/html/rfc6455#section-5.2 for header bytes structure |
My code has been hacked about quite a bit, but the header bytes are there from my server. Removing the masking is actually easy. Remove the mask bit, and comment out the mask method call. Seem to have a problem with UTF-8 decoding now... investigating. |
Mine is working now. As above, I just commented out the masking code where it builds a packet. I forgot to take out the mask key from the header which caused UTF-8 errors. |
Stuorguk, can you be a little more specific about what you did? I started commenting out the masking code as well, but now I'm getting unexpected characters encountered issues. |
I got mine working now too. Just a couple specifics: In the Hybi10 implementation I commented out the following lines: In DataFrame.AsFrame(): Mask(); //Uses _header, must call ToBytes before calling Mask In FrameHeader.ToBytes(): data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked Mask = random.Next(Int32.MaxValue); I test it with both the Flash Socket and against Chrome 19 and it seems ok now. Haven't tested yet against older versions of Chrome. |
Thanks; I can put in an emergency fix for now and work on updating the Does anyone use the client? Would it be a problem to break it for a day or On Fri, May 18, 2012 at 11:07 AM, jrperina <
|
Hi, I'm experiencing this issue too. jrperina's quick fix works for Chrome but it doesn't work with Safari or an iOS emulator. Has a patch been released for this issue yet? Thanks, |
Appears to work and passes all of my tests; used @jrperina fix. |
@coldwired Safari and iOS use an old version of the websocket protocol that we haven't built in support for yet; we'll re-open that now that we've moved past this chrome issue. |
hi,
I am now using AS3Websocket ( https://github.com/Worlize/AS3WebSocket ) to write an AIR web-socket client application, and using application written in C# with Alchemy as server.
when I connect client to websocket.org echo test server( http://www.websocket.org/echo.html ), I can send and receive data perfectly;
when client connect to my server, client sends and server receives; but when server sends and client receives, the client shows error code 1002, said received illegal masked frame from server.
Having a quick look about the error code according to the specification of RFC6455 (http://tools.ietf.org/html/rfc6455#section-5.1)
"A server MUST NOT mask any frames that it sends to the client.".
Hence, I guess there is something wrong about the protocol between the client and server.
I would kindly ask for your support on this issue, any help would be great :)
The text was updated successfully, but these errors were encountered: