From 140dc151919101c38f16d0a7dc4221941651f74d Mon Sep 17 00:00:00 2001
From: Christian Schneider
Date: Tue, 7 May 2024 18:17:38 +0200
Subject: Switch empty /itjs/ results from 200 to 404

---
 itjs.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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);
-- 
cgit v1.2.3