[Zope] Problem with alternate path and request

Fernando Martins fmartins at hetnet.nl
Tue Oct 14 15:44:14 EDT 2003


Hello list,

I'm using VHM and I need the (real) remote IP, as given by
HTTP_X_FORWARDED_FOR. However, when accessing the page without any
virtualization, I need to fall back on REMOTE_ADDR.

Now, any idea why the following

  <p tal:content="request/HTTP_X_FORWARDED_FOR | request/REMOTE_ADDR"></p>

doesn't work as expected: HTTP_X_FORWARDED_FOR returns an empty string
rather than failling in favor of REMOTE_ADDR.

I've overcomed the problem using "or" in python, but I got puzzled with this
situation.

Is this a bug or am I missing something?

Cheers,
Fernando




More information about the Zope mailing list