try to send something if an error happend

This commit is contained in:
Benoit Chesneau 2010-01-19 00:19:38 +01:00
parent d37a9d81dc
commit 43b9209144

View File

@ -117,5 +117,7 @@ class Worker(object):
http.HTTPResponse(client, response, req).send()
except Exception, e:
self.log.exception("Error processing request. [%s]" % str(e))
# try to send something if an error happend
msg = "HTTP/1.0 500 Internal Server Error\r\n\r\n"
util.write_nonblock(client, msg)
util.close(client)