git://git.jankratochvil.net
/
MyWeb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support "mailto:" stripping also from "(at)" obfuscated addresses.
[MyWeb.git]
/
Redirect.pm
diff --git
a/Redirect.pm
b/Redirect.pm
index
25cbfb5
..
871f65f
100644
(file)
--- a/
Redirect.pm
+++ b/
Redirect.pm
@@
-24,22
+24,20
@@
use strict;
use warnings;
use My::Web;
use warnings;
use My::Web;
-use Apache2::Const qw(HTTP_MOVED_
TEMPORARI
LY);
+use Apache2::Const qw(HTTP_MOVED_
PERMANENT
LY);
-our $HTML_TEST=0;
+our $HTML_TEST="download";
+our $HTML_TEST_RC=HTTP_MOVED_PERMANENTLY;
+our $HTML_TEST_QUERY_STRING="location=http://localhost/";
sub handler
{
my $W=My::Web->init(
sub handler
{
my $W=My::Web->init(
- "header_only"=>1,
"args_check"=>{
"location"=>'^\w+://',
},
);
"args_check"=>{
"location"=>'^\w+://',
},
);
-$W->{"r"}->status(HTTP_MOVED_TEMPORARILY);
-$W->{"r"}->headers_out()->{"Location"}=$W->{"args"}{"location"};
-
-exit 0;
+My::Web->http_moved($W->{"args"}{"location"},HTTP_MOVED_PERMANENTLY);
}
1;
}
1;