Django开发服务器问题

时间:2011-08-27 16:56:30

标签: python django

我注意到当我在调试模式下开发Django App时,我有时会在服务器stdout上看到这个输出:

Traceback (most recent call last):
  File "/Users/josephmisiti/projects/temp/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 284, in run
    self.finish_response()
  File "/Users/josephmisiti/projects/temp/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 324, in finish_response
    self.write(data)
  File "/Users/josephmisiti/projects/temp/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 403, in write
    self.send_headers()
  File "/Users/josephmisiti/projects/temp/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 467, in send_headers
    self.send_preamble()
  File "/Users/josephmisiti//projects/temp/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 385, in send_preamble
    'Date: %s\r\n' % http_date()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 297, in write
    self.flush()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 284, in flush
    self._sock.sendall(buffer)
error: [Errno 32] Broken pipe
[27/Aug/2011 11:54:14] "GET / HTTP/1.1" 2

有人能告诉我为什么会这样吗?

1 个答案:

答案 0 :(得分:3)

浏览器在服务器完成发送响应之前关闭套接字连接(例如,在完全加载之前关闭了选项卡)。别担心。