Mercurial > p > roundup > code
comparison roundup/cgi/wsgi_handler.py @ 4908:92757447dcf0 routing
Remove PATH_INFO hacks that strip leading slash
PATH_INFO should always start with '/' when not empty, see
http://tools.ietf.org/html/rfc3875#section-4.1.5
Instead, do leading slash stripping inside cgi.client
| author | anatoly techtonik <techtonik@gmail.com> |
|---|---|
| date | Wed, 16 Jul 2014 03:10:02 +0300 |
| parents | 7aa72c31464d |
| children |
comparison
equal
deleted
inserted
replaced
| 4907:c37069a99cec | 4908:92757447dcf0 |
|---|---|
| 51 request.wfile.write(DEFAULT_ERROR_MESSAGE % locals()) | 51 request.wfile.write(DEFAULT_ERROR_MESSAGE % locals()) |
| 52 return [] | 52 return [] |
| 53 | 53 |
| 54 tracker = roundup.instance.open(self.home, not self.debug) | 54 tracker = roundup.instance.open(self.home, not self.debug) |
| 55 | 55 |
| 56 # need to strip the leading '/' | |
| 57 environ["PATH_INFO"] = environ["PATH_INFO"][1:] | |
| 58 if request.timing: | 56 if request.timing: |
| 59 environ["CGI_SHOW_TIMING"] = request.timing | 57 environ["CGI_SHOW_TIMING"] = request.timing |
| 60 | 58 |
| 61 form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) | 59 form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) |
| 62 | 60 |
