]> git.xolatile.top Git - emil-3chen.org.git/commitdiff
--
authorEmil Williams <emilemilemil@cock.li>
Sat, 17 May 2025 19:02:31 +0000 (13:02 -0600)
committerEmil Williams <emilemilemil@cock.li>
Sat, 17 May 2025 19:02:31 +0000 (13:02 -0600)
perl/Triple.pm

index 3f603b8ffa256240da5d4cb8253061ea4f5f5146..76a4aa0f746fb49cecd721c42fc4e47139d84265 100644 (file)
@@ -123,12 +123,19 @@ sub Triple::main {
             $location = $vars->{"uri"};
         }
 
-        print $cgi->header(
-            -Content_Type => 'text/html',
-            -charset      => 'UTF-8',
-            -status       => $status,
-            -location     => undef,
-            );
+        if ($location) {
+            print $cgi->header(
+                -Content_Type => 'text/html',
+                -charset      => 'UTF-8',
+                -status       => $status,
+                -location     => $location,
+                );
+        } else {
+            print $cgi->header(
+                -Content_Type => 'text/html',
+                -charset      => 'UTF-8',
+                );
+        }
 
         next if $status ne '';