New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect assumption in werkzeug.serving about socket behavior #920
Comments
While you're probably correct (haven't done any research), please note that Werkzeug's server is only intended for development. Running it in Docker and with gevent leads me to believe that you don't use it for that purpose. |
I've been actually using docker for development and part of the code used gevent monkeypatches quite frivulously. |
I've experienced this bug in Python 3.5, but only when setting the underlying socket to non-blocking mode (e.g with A workaround that has been implemented in other web servers is to wrap the Not sure if werkzeug wants to implements a workaround too, or considers it a non-werkzeug issue. |
based on the provided information i believe this indeed is either a gevent bug or a stdlib bug, werkzeug uses write + flush on a supposed buffered file, which in turn should always work, now i wonder if this also happens on plain python, or only on gevent |
@RonnyPfannschmidt yes, I get it without |
Given the circumstances this happens in, as well as the fact that it's fixed in Python 3.5 (3.4 goes EOL in March), I'm closing this. |
As we all know socket.send() doesn't guarantee all of the data getting sent
and this line:
werkzeug/werkzeug/serving.py
Line 165 in 03faf05
combined with gevent and the greatest webscale technology, known as docker has led me to just that behavior with responses getting truncated :3
It seems like the socket.SocketIO should care about it, but it doesn't
The text was updated successfully, but these errors were encountered: