As soon as there are spaces in the PATH_INFO variable, the proxy sends two requests instead of one and those requests seem to be completely broken. I could not figure out why exactly it does that but a workaround seems to be to requote PATH_INFO, e.g.:
environ["PATH_INFO"] = urllib.quote(environ["PATH_INFO"])
And this is also what the paste project proxy does: http://svn.pythonpaste.org/Paste/tags/1.4.2/paste/proxy.py in line 91