Location.pm is a redirector that expects to find a URL on a
query string value assigned to location, it deals with the hex
unescaping and issues the redirect.
Location.pm consists only of the following 18 lines of Perl:
package Location;
use strict;
use Apache::Constants qw(REDIRECT);
sub handler {
my $r=Apache->request;
$ENV{'QUERY_STRING'}=$r->args;
my($dest)=(grep(/^location=/,split(/\&/,$ENV{'QUERY_STRING'})))
or $ENV{'QUERY_STRING'};
$dest=~s/^location=//;
$dest=~s/%(..)/pack("c",hex($1))/ge;
$r->status(302);
$r->header_out(Location=>$dest);
$r->send_http_header;
return REDIRECT;
} # handler
1;