Grant == Grant McLean [EMAIL PROTECTED] writes:
Grant I've seen a number of code examples for redirects which output a
Grant root-relative URI in the Location header. Eg:
Grant Location: /images/item1.gif
If that's coming out from a CGI or Apache::Registry script, the
browser never sees it,
--- Grant McLean [EMAIL PROTECTED] wrote:
Is there an easy way to get the absolute URI of the current request
to use with Apache::URI-parse to translate a relative URI to
absolute?
From perldoc URI
-
$uri = URI#8722;new_abs( $str, $base_uri )
This constructs a
Grant McLean wrote:
I've seen a number of code examples for redirects which output a
root-relative URI in the Location header. Eg:
Location: /images/item1.gif
Although browsers seem to accept this and do 'the right thing', the
HTTP RFC seems to be pretty clear that the Location header must be
Geoffrey Young wrote:
Grant McLean wrote:
Is there an easy way to get the absolute URI of the current request
to use with Apache::URI-parse to translate a relative URI to
absolute?
to generate a URI that points to the same server as the
current request it's best to use Apache::URI
Geoffrey Young wrote:
to generate a URI that points to the same server as the current request
it's best to use Apache::URI methods, which are pretty easy.
my $uri = Apache::URI-parse($r);
$uri-path('/some/new/document.html');
my $absolute_uri = $uri-unparse;
note that calling path() (or