my $method = $ENV{'REQUEST_METHOD'} || '';
my $content_length = $ENV{'CONTENT_LENGTH'} || 0;
my $content_type = $ENV{'CONTENT_TYPE'} || '';
+ my $status = '';
my $body = '';
- if ($method eq 'POST' && $content_length > 0) {
- read(STDIN, $body, $content_length);
+ if ($method eq 'POST') {
+ if ($content_length > 0) {
+ read(STDIN, $body, $content_length);
+ }
+ $status = '302 Found';
+ $location = $vars->{"uri"};
}
my $cgi = CGI->new;
print $cgi->header(
-Content_Type => 'text/html',
-charset => 'UTF-8',
- # -status => 'feed',
+ -status => $status,
+ -location => $location,
);
my $page = $static{$vars->{uri}};