Giter Club home page Giter Club logo

Comments (7)

fafhrd91 avatar fafhrd91 commented on July 18, 2024 1

interesting. i wont be able to check until weekend, maybe next week. but something is definitely not right

from ntex.

fafhrd91 avatar fafhrd91 commented on July 18, 2024

this problem is fixed in master. but you have to use web::ws::start or write response directly to io, h1 dispatcher cannot do anything when handler is in ws upgrade mode.

from ntex.

khvzak avatar khvzak commented on July 18, 2024

Thanks @fafhrd91 for fixing this!

There is an edge case, although. It's impossible to reject an upgrade request by sending non-101 response with a body.
I'm getting error Stream responses are not supported for upgrade requests.
With response header
Connection: upgrade
which seems wrong.

Basically this error would appear for any normal (non-websocket) handlers when sending upgrade requests.
Is this expected?

from ntex.

fafhrd91 avatar fafhrd91 commented on July 18, 2024

i think this is bug, h1 dispatcher should not try write response. i will check

from ntex.

khvzak avatar khvzak commented on July 18, 2024

Maybe I'm wrong, but should dispatcher continue working as usual for all types of requests (upgrade and non-upgrade) when underlying IO wasn't taken?

ws::start as well as low-level websocket (or connection upgrading) handling requires taking IO object off which makes impossible returning response from handler.

from ntex.

fafhrd91 avatar fafhrd91 commented on July 18, 2024

dispatcher is generic over Filter, to pass io to handler F get erased (IoBoxed), it is not possible to restart dispatcher after that

from ntex.

fafhrd91 avatar fafhrd91 commented on July 18, 2024

should be fixed in 0.6.5

from ntex.

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.