minor bugfix: cherrypy proxy() buggy over multiple proxy
In case of cherrypy over multiple http proxies, the X-Forwarded-Host can contain multiple hostnames, separated by ", " . The proxy() function is lib/tools.py doesn't handles this case, which leads to multiple problems in the higher level code. (By fact, nearly killed an openerp project)
I traced it, and here is a patch: (for cherrypy3.1.2)
if local: base = request.headers.get(local, base)
- if ", " in base:
- base = base.split(", ") if not base: port = cherrypy.request.local.port if port == 80:
Please fix it soon, a such low-level problem harms a lot to the people. Thanks.
Reported by email@example.com