Hi,
I could use a bit of help.
I'm looking at the code for PrefixMiddleware:
http://pythonpaste.org/deploy/paste/deploy/config.py.html?f=192&l=277#192
If X_FORWARDED_SERVER is set and self.force_port is None,
environ['SERVER_PORT'] should be updated intelligently. It should
contain either the port specified in X_FORWARDED_SERVER, 80, or 443.
Back in my Aquarium days, this worked. The code looked like:
defaultReturnValue = (cgiEnv["SERVER_NAME"], cgiEnv["SERVER_PORT"])
(cgiEnv["SERVER_NAME"], cgiEnv["SERVER_PORT"]) = parseHost(
header=cgiEnv.get("HTTP_X_FORWARDED_HOST"),
defaultReturnValue=defaultReturnValue, isSecure=isSecure)
where parseHost was defined in:
http://aquarium.cvs.sourceforge.net/aquarium/aquarium/aquarium/parse/Host.py?view=markup
Since environ['SERVER_PORT'] isn't being updated properly, I'm forced
to specify force_port. That's a pain because the value differs
between production and development. Ideally, this should just come
from X_FORWARDED_SERVER.
What's worse is that I can't currently specify force_port because
specifying the following in the .ini file breaks "paster setup-app":
filter-with = proxy-prefix
[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
force_port =
prefix =
I brought up this issue here:
http://groups.google.com/group/pylons-discuss/browse_frm/thread/1da07543512792
Thanks for your help!
-jj
--
http://jjinux.blogspot.com/
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users