Git Product home page Git Product logo

Comments (16)

ajacksified avatar ajacksified commented on May 27, 2024

Thanks- I'll check this out and see what I can confirm.

from alchemy-websockets.

ajacksified avatar ajacksified commented on May 27, 2024

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!

from alchemy-websockets.

jrperina avatar jrperina commented on May 27, 2024

+1 seems to be showing up with the latest version of Chrome (version 19).

from alchemy-websockets.

mantolo avatar mantolo commented on May 27, 2024

Thanks for the reply. It is good to hear that you're getting to fix this issue,
looking forward to see new batch soon!

from alchemy-websockets.

0xStuart avatar 0xStuart commented on May 27, 2024

+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. :(

from alchemy-websockets.

ajacksified avatar ajacksified commented on May 27, 2024

@stuorguk you could try to use https://github.com/gimite/web-socket-js and set window.WEB_SOCKET_FORCE_FLASH = true; I'll be trying to fix this particular issue tonight

from alchemy-websockets.

0xStuart avatar 0xStuart commented on May 27, 2024

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.

from alchemy-websockets.

mantolo avatar mantolo commented on May 27, 2024

Actually I have drilled-down abit to see what was happening in my case.
By comparing data being sent & received, I have found that the message dispatched from server side does not contain header bytes, which should be presented in web-socket frames to describe what data it is.
So if you are looking for a quick fix, you could try to manually create and attach header bytes in your code before you send message.

refer to http://tools.ietf.org/html/rfc6455#section-5.2 for header bytes structure

from alchemy-websockets.

0xStuart avatar 0xStuart commented on May 27, 2024

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.

from alchemy-websockets.

0xStuart avatar 0xStuart commented on May 27, 2024

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.

from alchemy-websockets.

jrperina avatar jrperina commented on May 27, 2024

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.

from alchemy-websockets.

jrperina avatar jrperina commented on May 27, 2024

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);
headerBytes.Add(BitConverter.GetBytes(Mask));

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.

from alchemy-websockets.

ajacksified avatar ajacksified commented on May 27, 2024

Thanks; I can put in an emergency fix for now and work on updating the
client later. It gets tricky in that the WebSocket client uses the same
dataframe class, but it may be as simple as passing in a parameter when
creating the data frame to tell it when to mask. This kills the integration
tests.

Does anyone use the client? Would it be a problem to break it for a day or
two, to get the server running?

On Fri, May 18, 2012 at 11:07 AM, jrperina <
[email protected]

wrote:

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);
headerBytes.Add(BitConverter.GetBytes(Mask));

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.


Reply to this email directly or view it on GitHub:

#21 (comment)

from alchemy-websockets.

coldwired avatar coldwired commented on May 27, 2024

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,
Colin.

from alchemy-websockets.

ajacksified avatar ajacksified commented on May 27, 2024

Appears to work and passes all of my tests; used @jrperina fix.

from alchemy-websockets.

ajacksified avatar ajacksified commented on May 27, 2024

@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.

from alchemy-websockets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.