&My::Web::footer call is deprecated now, use just: exit;
[www.jankratochvil.net.git] / project / Rel.pm
index ae0d5f3..65b51a6 100755 (executable)
@@ -24,7 +24,7 @@ use strict;
 use warnings;
 
 use My::Web;
-use Apache2::Const qw(HTTP_MOVED_TEMPORARILY);
+use Apache2::Const qw(HTTP_MOVED_PERMANENTLY);
 Wrequire 'project::Lib';
 
 
@@ -33,12 +33,13 @@ our $HTML_TEST=0;
 sub handler
 {
 my $W=My::Web->init(
-               "header_only"=>1,
                "args_check"=>{
                                "rel"=>'^(?:prev|next)$',
                                "project"=>'^\w+$',
                                },
+               "header_only"=>1,
                );
+My::Web->heading();
 
 
 my %item=project::Lib->name_to_hashref();
@@ -66,10 +67,6 @@ for (0..$#projects) {
        last if $target;
        }
 
-$W->{"r"}->status(HTTP_MOVED_TEMPORARILY);
-$W->{"r"}->headers_out()->{"Location"}=path_web "./".($target && "$target/"),"abs"=>1;
-
-
-exit 0;
+My::Web->http_moved("./".(!$target ? "" : "$target/"),HTTP_MOVED_PERMANENTLY);
 }
 1;