{{{
File "django/http/utils.py", line 17, in conditional_content_removal
if 100 <= response.status_code < 200 or response.status_code in (204,
304):
TypeError: unorderable types: int() <= str()
}}}
Proposed fix:
- Valid status values in the form of a string should be coerced to an
integer if possible.
- Integer values less than 100 or greater than 599 should also be rejected
based on [https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html W3C
Status Code Definitions RFC 2612]
--
Ticket URL: <https://code.djangoproject.com/ticket/27153>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Github PR: https://github.com/django/django/pull/7165
--
Ticket URL: <https://code.djangoproject.com/ticket/27153#comment:1>
* needs_better_patch: 0 => 1
* easy: 1 => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27153#comment:2>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/27153#comment:3>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"190d2ff4a7a392adfe0b12552bd71871791d87aa" 190d2ff4]:
{{{
#!CommitTicketReference repository=""
revision="190d2ff4a7a392adfe0b12552bd71871791d87aa"
Fixed #27153 -- Added validation for HttpResponse status.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27153#comment:4>