Giter Site home page Giter Site logo

Comments (6)

lpereira avatar lpereira commented on June 2, 2024

from lwan.

pontscho avatar pontscho commented on June 2, 2024

I've tested it directly with Lwan and yes, I took a look those headers.I've tested it directly with Lwan and yes, I took a look those headers and blowed my mind because Upgrade header was missing from the original request from Safari and everything worked well with Chrome.

The Upgrade method is necessary for websockets according to the RFC, so I don't really know if we should remove the check for it. Have you tried other websockets implementations?

Yes, that's why I'm doubled... I used websocat and openresty’s / chrome's / firefox's ws client implemlementations for testing and everything went fine except Safari.

from lwan.

lpereira avatar lpereira commented on June 2, 2024

from lwan.

pontscho avatar pontscho commented on June 2, 2024

Does it have a Sec-WebSocket-Version header? Is the value different than what other clients send?

Yes, with a correct value. It had every necessary headers except the Upgrade.

Do other servers work with Safari even without this header?

I used nginx before for tls termination and it worked but I overwrote http headers with it. I will check it again.

from lwan.

lpereira avatar lpereira commented on June 2, 2024

from lwan.

pontscho avatar pontscho commented on June 2, 2024

I just tried the websocket demo with Safari 15.4 here and ot seems to work!

I've tested it with Safari 13.1.4, it's quite old but significant number of users use have this version. I've tested it again with other sites that uses websocket and that header is still missing. Apple quality as well ... :) Only reason why I didn't see this error before I use ngx and it sent that Upgrade field, hided this problem.

Now, if removing the check is needed for interoperability, then that's probably OK, although I'd prefer working around broken clients if at all possible.

Thanks.

from lwan.

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.