summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2024-05-07 18:17:38 +0200
committerChristian Schneider2024-05-07 18:17:38 +0200
commit140dc151919101c38f16d0a7dc4221941651f74d (patch)
treecece83b5992f064b2052f1c7943e5bbebff940b9
parent8db292a501feccc66be4eb33a05d02674be89bbd (diff)
downloaditools-140dc151919101c38f16d0a7dc4221941651f74d.tar.gz
itools-140dc151919101c38f16d0a7dc4221941651f74d.tar.bz2
itools-140dc151919101c38f16d0a7dc4221941651f74d.zip
Switch empty /itjs/ results from 200 to 404
-rw-r--r--itjs.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/itjs.php b/itjs.php
index 5ca5719..b777c3c 100644
--- a/itjs.php
+++ b/itjs.php
@@ -88,4 +88,7 @@ else if ($files && !it::match('\.html$', $lastfile))
if (strpos($data, "<?php") !== false)
it::error("sending php source?!");
-echo $nostrip ? $data : itjs::strip($data);
+if (strlen($content = $nostrip ? $data : itjs::strip($data)))
+ echo $content;
+else
+ http_response_code(404);