Closed erikreed closed 7 years ago
@jrief sorry if this is documented somewhere and i missed it, but this issue still persists raise ValueError('HTTP status code must be an integer from 100 to 599.')
(Django==1.11.3) and i see that this status code is still 1001 in the main branch https://github.com/jrief/django-websocket-redis/blob/a830aa792874b78a76aeb21baf7c4b554e554dfd/ws4redis/wsgi_server.py#L151
Is there a reason for it being a non standard HTTP response code? Thanks!
From my understanding at that time, this was the correct Websocket HTTP code. Shall it be changed?
Argh, I’m still running 0.4.7 in that environment, thought I’m using the latest version, should work just fine after upgrading. Thanks!! If django continues adding validations to the HttpResponseBase class we might have to move away from using HttpResponse to be able to use websocket status codes. Right now they are only checking on init
Responsible snippet (wsgi_server.py:148):
Stack trace:
The cause is HTTP status code validation added in Django v1.11: https://github.com/django/django/commit/190d2ff4a7a392adfe0b12552bd71871791d87aa
i.e.
100 <= self.status_code <= 599
.