[Zope] REQUEST.URL and missing subfolders

Peter Hernberg petehern@yahoo.com
Tue, 24 Jul 2001 16:43:28 -0700 (PDT)


--- Dieter Maurer <dieter@handshake.de> wrote:
> Peter Hernberg writes:
>  > I'm configuring standard_error_message to forward 404s to their new
> location.
>  > According to the Zope Book, REQUEST.URL is "The URL of the Request without
> query
>  > string". I think I'm getting nailed by that "without query string" part. If
>  > someone requests http://www.mysite.com/a/b and there is no 'a' object,
>  > REQUEST.URL (when accessed from standard_error_message) will be
>  > 'http://www.mysite.com/a'. I assume this is because Zope thinks 'b' is an
>  > argument being passed to 'a'. How can I get the *real* URL the client
> requested?
> The URL variables are build during traversal.
> If traversal fails due to a missing object, they are truncated.
> 
> You can use REQUEST.PATH_INFO to get the full url.

The problem with PATH_INFO is that it includes the VirtualHostMonster component
of the url, something I'd like to be abstracted from (that's the whole idea of
VirtualHostMonsters :). Right now I'm just stripping it out, but it would seem
sensible to have a variable that provides the true path of the REQUEST without
having to hack out the VirtualHostMonster component of the path.

=====
Peter Hernberg
Digerati R Us

"More love or more disdain I crave"    --Charles Webbe

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/