[ZPT] Problem with request/HTTP_X_FORWARDED_FOR
Fernando Martins
fmartins at hetnet.nl
Sun Oct 19 18:29:57 EDT 2003
Hello,
Sorry for the cross-posting but I've posted before on the zope list without
reply. The following looks like to be a bug on the lookup of the request
attributes. If request doesn't have the attribute HTTP_X_FORWARDED_FOR, the
following TALES expression should return REMOTE_ADDR. In fact, it returns
the empty string.
<p tal:content="request/HTTP_X_FORWARDED_FOR | request/REMOTE_ADDR"></p>
Naturally, the following works ok:
<p tal:content="python: request['HTTP_X_FORWARDED_FOR'] or
request['REMOTE_ADDR']"></p>
Shall I file it as a bug or am I missing something?
Cheers,
Fernando
More information about the ZPT
mailing list