Code Monkey home page Code Monkey logo

Comments (10)

Ivoz avatar Ivoz commented on June 16, 2024

Same, I ran

$ uwsgi --master --http :5000 --http-websockets --gevent 100 --wsgi chat:app

and got as a log

GET /websocket => generated 233 bytes in 10 msecs (HTTP/1.1 404) 2 headers in 72 bytes (3 switches on core 99)

from flask-uwsgi-websocket.

gevatter avatar gevatter commented on June 16, 2024

I can reproducte this, after downgrading flask-uwsgi-websocket
to 0.4.4 the examples are running.

from flask-uwsgi-websocket.

mckabi avatar mckabi commented on June 16, 2024

Same problem flask-uwsgi-websocket==0.4.5 with below exception:

examples/echo $ env/bin/python echo.py
...snip...
Traceback (most recent call last):
  File "examples/echo/env/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "examples/echo/env/lib/python2.7/site-packages/flask_uwsgi_websocket/websocket.py", line 70, in __call__
    raise e
werkzeug.exceptions.NotFound: 404: Not Found
[pid: 95947|app: 0|req: 1/1] 127.0.0.1 () {40 vars in 839 bytes} [Mon Oct 12 05:36:57 2015] GET / => generated 0 bytes in 1 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)

Could not access any routing point of app.url_map, but ws.url_map is OK.

flask-uwsgi-websocket==0.4.4 is OK with same code and env.

from flask-uwsgi-websocket.

cyc60 avatar cyc60 commented on June 16, 2024

+1, same problem with 0.4.5

from flask-uwsgi-websocket.

hitigon avatar hitigon commented on June 16, 2024

looks like the previous commits with werkzeug url processors did not apply the same logic as Websocket for Gevent websocket middleware.

did some patches from my fork using code from websocket middleware, check this commit

from flask-uwsgi-websocket.

zeekay avatar zeekay commented on June 16, 2024

Does that rectify your issue? Having some issues after re-installing. Can you do a PR?

from flask-uwsgi-websocket.

hitigon avatar hitigon commented on June 16, 2024

@zeekay did another commit to fix Websocket middleware as well, basically, (Map) urls.match() would fail and raise 404 not found since the WebsocketMiddleware was called twice (for the demos) from both websocket request and http request (if one application provides both http and ws services, i.e the demo page). What i did is just to silence the exception instead of raising the error.

from flask-uwsgi-websocket.

zeekay avatar zeekay commented on June 16, 2024

This should be fixed by @hitigon's PR.

from flask-uwsgi-websocket.

countach74 avatar countach74 commented on June 16, 2024

It probably is. I haven't had a chance to test it yet. Will try to do that
soon.

On Thu, Oct 29, 2015 at 8:47 AM Zach Kelling [email protected]
wrote:

This should be fixed by @hitigon https://github.com/hitigon's PR.


Reply to this email directly or view it on GitHub
#38 (comment)
.

from flask-uwsgi-websocket.

zeekay avatar zeekay commented on June 16, 2024

I manually tested briefly, seems to have resolved things. Really need to add a simple test suite....

from flask-uwsgi-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.