diff -r f3a3129a0a26 django/core/servers/basehttp.py
a
|
b
|
|
13 | 13 | import re |
14 | 14 | import sys |
15 | 15 | import urllib |
| 16 | import socket |
16 | 17 | |
17 | 18 | from django.utils.http import http_date |
18 | 19 | |
… |
… |
|
487 | 488 | |
488 | 489 | def handle_error(self): |
489 | 490 | """Log current error, and send error output to client if possible""" |
490 | | self.log_exception(sys.exc_info()) |
| 491 | exc_type, exc_value = sys.exc_info()[:2] |
| 492 | if issubclass(exc_type, socket.error) and exc_value.args[0]==32: |
| 493 | self.request_handler.log_request(self.status.split(' ',1)[0], "%s %s" % (self.bytes_sent, exc_value.args[1])) |
| 494 | else: |
| 495 | self.log_exception(sys.exc_info()) |
491 | 496 | if not self.headers_sent: |
492 | 497 | self.result = self.error_output(self.environ, self.start_response) |
493 | 498 | self.finish_response() |