Commit 3c2ca753 authored by Ralf Schmitt's avatar Ralf Schmitt

pywsgi: fix empty writes

--HG--
extra : transplant_source : s%FF%AD%1AeG%2B-sGr%C7%2A%22D%B6%90u%87%F4
parent 42c2dfe8
......@@ -250,7 +250,10 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
for key, value in response_headers]
headers_set[:] = [status, capitalized_headers]
return write
def safe_write(d):
if len(d):
write(d)
return safe_write
try:
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment