#29343: An exception AttributeError during HEAD request on media object
-------------------------------------------+------------------------
Reporter: Yehor Smoliakov | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
In developer mode I ran this command in the console:
{{{
curl --head
http://127.0.0.1:8000/media/blog/author/UqdQXbTuSjW_UbGCNMhFpA.jpg
}}}
And got this exception:
{{{
[20/Apr/2018 10:36:43] "HEAD /media/blog/author/UqdQXbTuSjW_UbGCNMhFpA.jpg
HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 49750)
Traceback (most recent call last):
File "/usr/lib/python3.6/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.6/wsgiref/handlers.py", line 180, in
finish_response
self.write(data)
File "/usr/lib/python3.6/wsgiref/handlers.py", line 279, in write
self._write(data)
File "/usr/lib/python3.6/wsgiref/handlers.py", line 453, in _write
result = self.stdout.write(data)
File "/usr/lib/python3.6/socketserver.py", line 775, in write
self._sock.sendall(b)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/wsgiref/handlers.py", line 141, in run
self.handle_error()
File "/home/yehor/.local/share/virtualenvs/webapp-Dlno2ZDu/lib/python3.6
/site-packages/django/core/servers/basehttp.py", line 86, in handle_error
super().handle_error()
File "/usr/lib/python3.6/wsgiref/handlers.py", line 368, in handle_error
self.finish_response()
File "/usr/lib/python3.6/wsgiref/handlers.py", line 180, in
finish_response
self.write(data)
File "/usr/lib/python3.6/wsgiref/handlers.py", line 274, in write
self.send_headers()
File "/usr/lib/python3.6/wsgiref/handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "/usr/lib/python3.6/wsgiref/handlers.py", line 344, in
client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/socketserver.py", line 639, in
process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.6/socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.6/socketserver.py", line 696, in __init__
self.handle()
File "/home/yehor/.local/share/virtualenvs/webapp-Dlno2ZDu/lib/python3.6
/site-packages/django/core/servers/basehttp.py", line 154, in handle
handler.run(self.server.get_app())
File "/usr/lib/python3.6/wsgiref/handlers.py", line 144, in run
self.close()
File "/usr/lib/python3.6/wsgiref/simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
----------------------------------------
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29343>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.14e7abf6e9fc5165adb2ab7d56fc5b95%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.