Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-Type error #4

Open
jmcannon opened this issue Mar 22, 2019 · 0 comments
Open

Content-Type error #4

jmcannon opened this issue Mar 22, 2019 · 0 comments

Comments

@jmcannon
Copy link

jmcannon commented Mar 22, 2019

I ran into this bug while making a DELETE request to my django-livesync enabled backend powered by django-rest-framework.
Here's a trace:

Traceback (most recent call last):
  File ".../django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File ".../livesync/core/middleware.py", line 12, in __call__
    return self.process_response(request, response)
  File ".../livesync/core/middleware.py", line 16, in process_response
    if settings.DEBUG and 'text/html' in response['Content-Type']:
  File ".../django/http/response.py", line 144, in __getitem__
    return self._headers[header.lower()][1]
KeyError: 'content-type'

Someone already fixed it in a fork: src-r-r@55555f6. Would be great to see the fix in the npm package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant