From 399bb180a0ad4bf1b362b861c054b89dc6fbf81a Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Sat, 17 May 2025 12:57:41 -0600 Subject: [PATCH] -- --- perl/Triple.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/perl/Triple.pm b/perl/Triple.pm index 3d19248..d2761ab 100644 --- a/perl/Triple.pm +++ b/perl/Triple.pm @@ -96,6 +96,9 @@ sub Triple::main { while($request->Accept() >= 0) { my $cgi = CGI->new; + my $header = CGI::Header->new($cgi); + $header->type('text/html'); + $header->charset('utf-8'); $vars->{"ip"} = $ENV{'REMOTE_ADDR'} || '?'; $vars->{"uri"} = $ENV{'REQUEST_URI'} // '/'; @@ -123,13 +126,10 @@ sub Triple::main { $location = $vars->{"uri"}; } - $cgi->header->location = $location if $location; + $header->location = $location; + $header->status = $status; - print $cgi->header( - -Content_Type => 'text/html', - -charset => 'UTF-8', - -status => $status, - ); + print $header->as_string(); next if $status ne ''; -- 2.39.5