Skip to content
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

Flask not working? #570

Closed
chinant opened this issue Jun 23, 2016 · 9 comments
Closed

Flask not working? #570

chinant opened this issue Jun 23, 2016 · 9 comments

Comments

@chinant
Copy link

chinant commented Jun 23, 2016

Flask for on Python 2 install fine, but I get some below error when run flask application.

curl -i http://127.0.0.1:5000/
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 12
Server: Werkzeug/0.11.10 Python/2.7.10
Date: Thu, 23 Jun 2016 13:07:40 GMT

curl: (18) transfer closed with 12 bytes remaining to read

get an error ERR_CONNECTION_RESET message on Chrome.

@sunilmut
Copy link
Member

Thanks for reporting the issue and trying out WSL! Which Windows build are you running? Can you also post the specific repro?

@chinant
Copy link
Author

chinant commented Jun 24, 2016

@sunilmut , thanks for the reply.
build: 14367.rs1 release 160613-1700

@glebovsky
Copy link

Hello!

Can confirm this on build 14372.rs1_release.160620-2342.
Connection resets on a static file like this:

http://127.0.0.1:8000/static/dist/vendor.bundle.js Failed to load resource: net::ERR_CONNECTION_RESET

@xBytez
Copy link

xBytez commented Oct 20, 2016

I think this might be related to #610

@sunilmut
Copy link
Member

sunilmut commented Dec 4, 2016

Marking this as duplicate of #610 for now. The fix for #610 is making it's way to the Insider build. If the issue persists even with the fix for #610, I would happily take the duplicate tag off and investigate. thanks.

@sunilmut
Copy link
Member

sunilmut commented Dec 6, 2016

The fix for #610 is in-bound to Insider builds. I don't have the repro for the above, so, I cannot validate whether #610 fixes this issue. If someone can post detailed repro, I am happy to try.

@xBytez
Copy link

xBytez commented Dec 7, 2016

PoC

# pip install Flask
# cat <<EOF > app.py
from flask import Flask
app = Flask(__name__)

@app.route('/')
def random():
    with open("/dev/urandom", 'rb') as f:
        return repr(f.read(10000000))

if __name__ == '__main__':
    app.run()
EOF
# python app.py

On Windows/WSL:

# curl -i http://127.0.0.1:5000/

Expected result

Curl finishes without errors

What happens when running the Flask server on WSL

  • curl exits with a 'connection reset' error when curling from Windows
  • curl exits with a "transfer closed with 521531 bytes remaining to read" when curling from WSL

I hope this is any use to you.

@sunilmut
Copy link
Member

@chinant - Given that #610 and #616 are fixed in 15002, this should be fixed as well. If you can validate your scenario and let us know, we can close this issue out.

@chinant
Copy link
Author

chinant commented Jan 18, 2017

@sunilmut , it's ok, you can close it! thank you for your hard work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants