From 75f9810bdbd5554f453e9e72ef70d424bc004e68 Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Thu, 29 May 2025 16:50:06 -0600 Subject: [PATCH] -- --- perl/Triple.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/perl/Triple.pm b/perl/Triple.pm index 267d70a..acbfb1d 100644 --- a/perl/Triple.pm +++ b/perl/Triple.pm @@ -20,9 +20,9 @@ use Triple::Init; our $debug = 0; use constant { - STATIC_PAGE => 0, - DYNAMIC_PAGE => 1, - REDIRECT_PAGE => 2, + STATIC_PAGE => 0, + DYNAMIC_PAGE => 1, + REDIRECT_PAGE => 2, PAGE_TYPE => 0, PAGE_TT => 1, PAGE_TO => 1, @@ -95,8 +95,6 @@ sub Triple::main { } open(my $fh, '>', 'post_dump.txt') or die; - # print $fh $body; - # print $fh "\r\n"; my %post = parse_post($body); print $fh Dumper %post; close $fh; @@ -105,7 +103,8 @@ sub Triple::main { $location = $vars->{"uri"}; } - my @search = @{$page{$vars->{uri}}}; + my @search = @{$page{$vars->{uri}} || $page{$vars->{''}}}; + if ($search[PAGE_TYPE] == REDIRECT_PAGE) { # $vars->{uri} = $search[PAGE_TO]; $status = '301 Moved Permanently'; -- 2.39.5