﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27153	HttpResponseBase should check for valid HTTP status code	Ryan Allen	nobody	"Currently, the HttpResponseBase class does not check for Type or Value Error on the HTTP status code. If a bad value such as a string is passed it, an exception is not thrown until it reaches:

{{{
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]"	Cleanup/optimization	closed	HTTP handling	1.10	Normal	fixed			Ready for checkin	1	0	0	0	0	0
