Skip to content

Fixes KeyError when Content-Type is forcibly removed from the HttpResponse. #153

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

Closed
wants to merge 1 commit into from

Conversation

andrepl
Copy link
Contributor

@andrepl andrepl commented Apr 12, 2011

Admittedly this is an edge case since django set's a content-type by default if you don't provide it, but it is possible, and sometimes desirable to remove it after the fact (When returning X-Accel-Redirect or similar headers). When it is removed, debug_toolbar throws a KeyError when attempting to check for an html content-type.

@dcramer dcramer closed this in bbf99c1 May 10, 2011
ryneeverett pushed a commit to ryneeverett/django-debug-toolbar that referenced this pull request Oct 2, 2016
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

Successfully merging this pull request may close these issues.

2 participants