I did test and look at the code, and I have question to the behavior.
I found failed test test_non_ascii_query_string_does_not_crash
, and It requires http://testserver/slash/?drink=caf%C3%A9
to be redirected(301). I think It doesn't need to be, as there's no need to prepend WWW(False default) and redirect with slash.
I think the test should changed to self.assertEqual(r.status_code, None)
, not 301.
and one more thing - this bug has occurred since I upgraded django from 1.8.7 to 1.9. In that case, URL without slash returns 500, not 404, and that makes process_response
not working I think. I'm inspecting more about this.
thanks for your sincere.
PS. when debug=False, after Not Found URL occured, this exception occurs: TemplateSyntaxError: Could not parse the remainder: '('static', filename='img/404.jpg')' from 'url_for('static', filename='img/404.jpg')'
, and that makes response code to 500, not 404.