Coder Social home page Coder Social logo

Comments (7)

ahyatt avatar ahyatt commented on July 18, 2024 2

My fix is committed at 5be01c6, can you try it out?

from emacs-websocket.

millejoh avatar millejoh commented on July 18, 2024 1

I was equally stymied, but now I see it. The debug buffer for the failed connection looks like the following:

[WS] Sending handshake, key: oLL4uXkeq8PgzWDaoRIMXg==, acceptance: NgPYUldwCscZZE51sXufDSBN6hM=
[WS] Received: HTTP/1.1 101 Switching Protocols
Server: TornadoServer/6.0.3
Date: Wed, 16 Oct 2019 14:16:37 GMT
Upgrade: websocket
Connection: Upgrade
Sec-Websocket-Accept: NgPYUldwCscZZE51sXufDSBN6hM=


[WS] Checking for accept header: Sec-WebSocket-Accept: NgPYUldwCscZZE51sXufDSBN6hM=
[WS] Closing websocket
[WS] Closing websocket
[WS] Sending frame, opcode: close payload: nil
[WS] State change to deleted

websocket-verify-headers checks for Sec-WebSocket-Accept, Tornado is returning Sec-Websocket-Accept. Sigh.

Your code does a better job following the RFC than Tornado/Jupter, but I wonder what the chances are of me getting either of those projects to use the proper spelling?

from emacs-websocket.

ahyatt avatar ahyatt commented on July 18, 2024

This is news to me. I checked the spec again, and it doesn't mention anything about this, in fact the value of Sec-Websocket-Accept is base64, which is case-sensitive.

However, you are correct that the upgrade should be case-insensitive. I'll fix that.

from emacs-websocket.

ahyatt avatar ahyatt commented on July 18, 2024

Actually, looking at the code again, the check is already case-insensitive (it is wrapped in a (let ((case-fold-search t)) ...) block. Being non-nil, searches and matches should ignore case.

from emacs-websocket.

ahyatt avatar ahyatt commented on July 18, 2024

Got it. Thanks for the explanation. That I can fix.

from emacs-websocket.

millejoh avatar millejoh commented on July 18, 2024

Works for me - thank you!

from emacs-websocket.

ahyatt avatar ahyatt commented on July 18, 2024

Cool, I merged this into master and will follow up with a version update. I usually push out to the gnu elpa a few weeks after github just to make sure there's no issues.

from emacs-websocket.

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.