You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a page contains any media file, or if we open media files in development (DEBUG=True), every second response shows this error.
Am I doing something wrong?
Console Output:
web_1 | [26/Dec/2020 09:08:39] "GET /media/1.png HTTP/1.1" 200 6440
web_1 | Internal Server Error: /media/1.png
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.9/site-packages/livesync/core/middleware.py", line 12, in call
web_1 | return self.process_response(request, response)
web_1 | File "/usr/local/lib/python3.9/site-packages/livesync/core/middleware.py", line 16, in process_response
web_1 | if settings.DEBUG and 'text/html' in response['Content-Type']:
web_1 | File "/usr/local/lib/python3.9/site-packages/django/http/response.py", line 144, in getitem
web_1 | return self._headers[header.lower()][1]
web_1 | KeyError: 'content-type'
web_1 | [26/Dec/2020 09:08:41] "GET /media/1.png HTTP/1.1" 500 70679
The text was updated successfully, but these errors were encountered:
raiaman15
changed the title
KeyError at /media/* 'content-type' every alternative response
KeyError at /media/* 'content-type' every alternate response
Dec 26, 2020
If a page contains any media file, or if we open media files in development (DEBUG=True), every second response shows this error.
Am I doing something wrong?
Console Output:
web_1 | [26/Dec/2020 09:08:39] "GET /media/1.png HTTP/1.1" 200 6440
web_1 | Internal Server Error: /media/1.png
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.9/site-packages/livesync/core/middleware.py", line 12, in call
web_1 | return self.process_response(request, response)
web_1 | File "/usr/local/lib/python3.9/site-packages/livesync/core/middleware.py", line 16, in process_response
web_1 | if settings.DEBUG and 'text/html' in response['Content-Type']:
web_1 | File "/usr/local/lib/python3.9/site-packages/django/http/response.py", line 144, in getitem
web_1 | return self._headers[header.lower()][1]
web_1 | KeyError: 'content-type'
web_1 | [26/Dec/2020 09:08:41] "GET /media/1.png HTTP/1.1" 500 70679
The text was updated successfully, but these errors were encountered: