From fc4764e57be311ea51999d2c860df538036fd05e Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Wed, 14 May 2025 13:30:12 -0600 Subject: [PATCH] -- --- perl/Triple.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/perl/Triple.pm b/perl/Triple.pm index 114ad45..5b0a4bc 100644 --- a/perl/Triple.pm +++ b/perl/Triple.pm @@ -53,10 +53,15 @@ sub Triple::main { 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; @@ -64,7 +69,8 @@ sub Triple::main { print $cgi->header( -Content_Type => 'text/html', -charset => 'UTF-8', - # -status => 'feed', + -status => $status, + -location => $location, ); my $page = $static{$vars->{uri}}; -- 2.39.5