This works for me and I use it widely:
UseCanonicalName off
and my $server = $r->header_in('Host');
---------------------------------------------------------------------
Best regards,
Karyn Ulriksen
Chief Systems Architect
PublicHost
22 Mauchly, Suite 200
Irvine, California 92618 USA
Phone: (949) 743-2000
email: [EMAIL PROTECTED]
URL: http://www.publichost.com
-----Original Message-----
From: Geoffrey Young [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 17, 2000 12:15 PM
To: 'Roger Espel Llima'; [EMAIL PROTECTED]
Subject: RE: getting the hostname from a TransHandler
> -----Original Message-----
> From: Roger Espel Llima [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 17, 2000 2:52 PM
> To: [EMAIL PROTECTED]
> Subject: getting the hostname from a TransHandler
>
>
> Hi,
>
> I need to get the "Host:" header sent by the client, from a
> TransHandler. Should I be using $r->header_in("Host"), or
> should I turn
> UseCanonicalName off and then use $r->get_server_name?
>
> I'd rather do the first, and it works when I try it, but I'm also
> thinking that PerlTransHandlers run before full header parsing,
I don't think so - request-header parsing happens prior to the
PostReadRequest phase.
all headers_in are available to you by uri translation.
HTH
--Geoff
> so
> $r->header_in might not be recommended at that point... any clues?
>
> --
> Roger Espel Llima, [EMAIL PROTECTED]
> http://www.iagora.com/~espel/index.html
>