shithub: werc

Download patch

ref: 3d298f96797d50499b3a0148ef679db82a2ae97f
parent: b7b3c7b1d4ea36ec141886409fca4e3ef33b8c92
author: <sl@stanleylieber.com>
date: Sun Nov 21 19:45:43 EST 2021

bin/contrib/rc-httpd/handlers/error: add missing error 400

--- a/bin/contrib/rc-httpd/handlers/error
+++ b/bin/contrib/rc-httpd/handlers/error
@@ -3,7 +3,7 @@
 fn do_error{
 	echo 'HTTP/1.1 '^$1^$cr
 	emit_extra_headers
-	echo 'Content-type: text/html'^$cr
+	echo 'Content-type: text/html; charset=utf-8'^$cr
 	echo $cr
 	echo '<html>
 <head>
@@ -17,6 +17,11 @@
 	</body>
 	</html>
 	'
+}
+
+fn 400{
+	do_error '400 Bad Request' \
+	'The request was invalid.'
 }
 
 fn 401{