@@ -249,6 +250,20 @@
}

#
+# Send HTTP headers
+#
+sub send_http_header {
+    my($error)=@_;
+
+    print CLIENT <<EOF;
+HTTP/1.0 $error
+Content-type: text/html
+Server: SAINT/1.2.1
+
+EOF
+}
+
+#
# Wrong magic number.
#
sub bad_html_magic {
@@ -299,6 +314,7 @@
local($script) = @_;

if (! -e $script) {
+     send_http_header("404 Script Not Found");
print CLIENT <<EOF
<HTML>
<HEAD>
@@ -313,6 +329,7 @@
EOF
; return;
}
+ send_http_header("200 OK");
do $script;
if ($@ && ($@ ne "\n")) {
print CLIENT <<EOF
