ahyatt/emacs-websocket

Ping response not per the RFC?

millejoh opened this issue · 5 comments

Not 100% on all the details, but I don't think emacs-websocket handles ping messages correctly. Per the RFC (and apparently Tornado's implementation of the protocol) a ping can have a payload which must be echoed in the pong response. I don't think Tornado cares if the ping payload is echoed, but it certainly expects the pong response to have a payload, even if said payload is empty.

I have hacked away at this a bit and seem to have this working on my fork - want me to send a pull request?

Thanks, I'll take a look. Sorry for the delay.

Yeah, something is definitely wrong here. I'm hoping there's a more elegant solution to the problem than dealing with the ping at the top-level of the response code. I'll look into this more in the next few days and hopefully have an alternate solution.

I've identified the core errors that led to this and created a fix branch. Please test out the ping-fix branch and let me know if this fixes it.

If I don't hear back in a week, I'll assume it does, merge the branch in, and close out the issue.

Just succesfully tried this out with ein and IPython-dev. Thanks!

Cool, I merged this in with the master branch, and after I fix another bug I'll push this as a new version.