From 658c9c0446591e41d6ebdb223c62c00342b83206 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 26 Jun 2012 14:49:23 +1200 Subject: Hunt down a tricky WSGI socket hang. --- netlib/wsgi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'netlib/wsgi.py') diff --git a/netlib/wsgi.py b/netlib/wsgi.py index 755bea5a..6fe6b6b3 100644 --- a/netlib/wsgi.py +++ b/netlib/wsgi.py @@ -104,7 +104,8 @@ class WSGIAdaptor: soc.write(str(h)) soc.write("\r\n") state["headers_sent"] = True - soc.write(data) + if data: + soc.write(data) soc.flush() def start_response(status, headers, exc_info=None): -- cgit v1.2.3