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

Broken pipe #2011

Closed
awenhu opened this issue Sep 7, 2016 · 1 comment
Closed

Broken pipe #2011

awenhu opened this issue Sep 7, 2016 · 1 comment

Comments

@awenhu
Copy link

awenhu commented Sep 7, 2016

my code:

from flask import Flask, make_response, request
app = Flask(name)

@app.route("/dtu//", methods=["GET","OPTIONS"])
def dtu(dtuid, addr):
o = drawMultipleDtu(dtuid,addr)
resp = make_response(o)
resp.headers["Access-Control-Allow-Origin"] = "*"
resp.headers["Access-Control-Request-Method"] = "POST,GET,PUT,DELETE,OPTIONS"
resp.headers["Access-Control-Allow-Methods"] = "POST,GET,PUT,DELETE,OPTIONS"
resp.headers["Access-Control-Allow-Headers"] = "X-Requested-With,Content-Type"

if request.method == 'OPTIONS':
    print "it's OPTIONS"
return resp

app.run(host="0.0.0.0", port=5010)
I always got this error:

Exception happened during processing of request from ('192.168.44.1', 54412)

Traceback (most recent call last):
File "/mnt/ENTER/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/mnt/ENTER/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/mnt/ENTER/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/mnt/ENTER/lib/python2.7/SocketServer.py", line 654, in init
self.finish()
File "/mnt/ENTER/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/mnt/ENTER/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/mnt/ENTER/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

@davidism
Copy link
Member

davidism commented Sep 7, 2016

pallets/werkzeug#954

@davidism davidism closed this as completed Sep 7, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants