Well - I suspect there is a *right* way to do this, but we do:

my $scheme = "http" ;
my $basePort = 80 ;
if ($ENV{'HTTPS'} eq "on") {
    $scheme = "https" ;
    $basePort = 443 ;
}

my $baseURI = "$scheme://" . $ENV{'HTTP_HOST'} ;
# my $baseURI = "http://" . $ENV{'SERVER_NAME'} ;
my $port = $ENV{'SERVER_PORT'};
if ($port != $basePort && $baseURI !~ m/:/) {
    $baseURI .= ":$port";
}

Sort of BFMI (brute force, massive ignorance), but it works.


On 3/29/06, Luke Vanderfluit <[EMAIL PROTECTED]> wrote:
Hi.

I want to get the url of a request.
So not the $r->uri
or $r->unparsed_uri
not the $r->hostname

but the part of the request that is 'http://my.server.com/ '

How do you guys do this?

Thanks.
Kind regards.

--
Luke



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to