Open datacticapertti opened 7 years ago
Code to reproduce (I think): bottle.response.status="302 "
Notice that the status string contains a space (and is therefor recognize as a valid status line), but nothing after the space. Bottle strips the last space internally, resulting in an invalid status line.
This is an unusual use of response.status
and probably a bug in the application, but it's easy to detect and bottle should throw a ValueError in this case.
I was setting up a simple proxy with bottle and wsgiproxy, the proxy is in the attached file. When the proxied server replies with a 302 redirect, I get the following error.
Chasing this I discovered that indeed response._status_line is "302" with no trailing space in that line. I'm not sure if it is bottle or wsgiproxy that forgets to add the space there, but anyway it would be good if bottle tried to make sure the status line is formatted correctly
Wsgiproxy is the one you get by running "pip install wsgiproxy".
authproxy.txt