-
Notifications
You must be signed in to change notification settings - Fork 183
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
WebSockets: A server must not mask any frames that it sends to the client. #176
Comments
Here is my attempt at a MWE: mwe.jl
mwe.html
This example will start a server and launch a browser that reads mwe.html. Inside mwe.html, it connects back to the Julia server and sends a message: "Hello Julia! From JavaScript". The Julia server receives the message, prints it to the REPL and sends a message back: "Hello JavaScript! From Julia". The output on the REPL looks like this:
So Julia successfully serves mwe.html and receives the websocket message back FROM the browser, but fails to send the websocket message TO the browser. In the browser console, it says:
Any ideas? |
I'm learning WAY more about WebSockets than I ever wanted (or can afford) to know 😂 However, reading more, I see that messages sent from client to server should be masked, but messages sent from server to client should not be masked. Is this correct? I suspect this is my problem.
from the Julia server is getting masked. What is the solution? Update: The relevant code is here: https://github.com/JuliaWeb/HTTP.jl/blob/master/src/WebSockets.jl#L184-L207 Need to figure out how to NOT mask when sent from server to client. Update^2: The type def for
If |
I'm making a little progress. I can now get binary data from Julia into a browser, but not having luck with text. This is the small change I made to
If I set
|
Closed via f576d4d |
Hi,
I've almost got WebSockets working, i.e. communicating between Julia and a browser.
I load a page into a browser with a JS library that connects to a Julia WebSocket server. I can send messages from the browser to Julia, so I know the Julia WebSocket server and the JS library are working. However, when I try to send something from Julia to the browser, e.g.
I get the following error in the dev console:
Any idea what that means? Any idea how to fix it?
The text was updated successfully, but these errors were encountered: