--
Ticket URL: <https://code.djangoproject.com/ticket/27640>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Old description:
> As reported [https://groups.google.com/forum/#!msg/django-
> developers/Dd-R-7YiQYQ/kM9PoQxiEQAJ on the mailing list],
> HTTPResponse.__repr__ crashes when the Content-Type header is not
> defined. It's legitimate that it's not defined when there is no body,
> e.g. for HTTP 204 responses
> ([https://stackoverflow.com/questions/21029351/what-content-type-
> should-a-204-no-response-use StackOverflow]).
New description:
As reported [https://groups.google.com/forum/#!msg/django-
developers/Dd-R-7YiQYQ/kM9PoQxiEQAJ on the mailing list],
`HTTPResponse.__repr__` crashes when the Content-Type header is not
defined. It's legitimate that it's not defined when there is no body, e.g.
for HTTP 204 responses ([https://stackoverflow.com/questions/21029351
/what-content-type-should-a-204-no-response-use StackOverflow]).
--
--
Ticket URL: <https://code.djangoproject.com/ticket/27640#comment:1>
* owner: nobody => roboslone
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/27640#comment:2>
* has_patch: 0 => 1
Old description:
> As reported [https://groups.google.com/forum/#!msg/django-
> developers/Dd-R-7YiQYQ/kM9PoQxiEQAJ on the mailing list],
> `HTTPResponse.__repr__` crashes when the Content-Type header is not
> defined. It's legitimate that it's not defined when there is no body,
> e.g. for HTTP 204 responses
> ([https://stackoverflow.com/questions/21029351/what-content-type-
> should-a-204-no-response-use StackOverflow]).
New description:
As reported [https://groups.google.com/forum/#!msg/django-
developers/Dd-R-7YiQYQ/kM9PoQxiEQAJ on the mailing list],
`HTTPResponse.__repr__` crashes when the Content-Type header is not
defined. It's legitimate that it's not defined when there is no body, e.g.
for HTTP 204 responses ([https://stackoverflow.com/questions/21029351
/what-content-type-should-a-204-no-response-use StackOverflow]).
[https://github.com/django/django/pull/7746 PR]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/27640#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/27640#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"544b2ef29f0f2577912f88cf746ae0ca5877b5f8" 544b2ef2]:
{{{
#!CommitTicketReference repository=""
revision="544b2ef29f0f2577912f88cf746ae0ca5877b5f8"
Fixed #27640 -- Fixed HttpResponse's __repr__() without a 'Content-Type'
header.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27640#comment:5>