From e5ec03bbcff7315fae078fec1c8b487642b8010e Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 22 Jun 2024 21:45:52 -0400 Subject: New error documents. --- .htaccess | 14 +++++++------- cgi/e.cgi | 23 +++++++++++++++++++++++ err/400.html | 42 ------------------------------------------ err/403.html | 42 ------------------------------------------ err/404.html | 43 ------------------------------------------- err/500.html | 42 ------------------------------------------ err/502.html | 42 ------------------------------------------ err/503.html | 42 ------------------------------------------ err/504.html | 43 ------------------------------------------- 9 files changed, 30 insertions(+), 303 deletions(-) create mode 100755 cgi/e.cgi delete mode 100644 err/400.html delete mode 100644 err/403.html delete mode 100644 err/404.html delete mode 100644 err/500.html delete mode 100644 err/502.html delete mode 100644 err/503.html delete mode 100644 err/504.html diff --git a/.htaccess b/.htaccess index 3f044bb..82ae133 100755 --- a/.htaccess +++ b/.htaccess @@ -11,10 +11,10 @@ DirectoryIndex index.shtml index.html Deny from all RedirectMatch 204 generate_204(.*)$ -ErrorDocument 400 /err/400.html -ErrorDocument 403 /err/403.html -ErrorDocument 404 /err/404.html -ErrorDocument 500 /err/500.html -ErrorDocument 502 /err/502.html -ErrorDocument 503 /err/503.html -ErrorDocument 504 /err/504.html +ErrorDocument 400 /cgi/e.cgi +ErrorDocument 403 /cgi/e.cgi +ErrorDocument 404 /cgi/e.cgi +ErrorDocument 500 /cgi/e.cgi +ErrorDocument 502 /cgi/e.cgi +ErrorDocument 503 /cgi/e.cgi +ErrorDocument 504 /cgi/e.cgi diff --git a/cgi/e.cgi b/cgi/e.cgi new file mode 100755 index 0000000..1384f1e --- /dev/null +++ b/cgi/e.cgi @@ -0,0 +1,23 @@ +#!/bin/bash + +echo -n "Status: ${REDIRECT_STATUS}\r\n" +echo -n "Content-type: text/html; charset=utf-8\r\n\r\n" +cat < + + + + +This is fine. + + + +
+THIS IS FINE. +
${REDIRECT_STATUS}. This is fine.
+
Image by KC Green
+
+ + +EOF + diff --git a/err/400.html b/err/400.html deleted file mode 100644 index 140e592..0000000 --- a/err/400.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -Chrisoft::Error! - - - - - -

400!!

-

Bad Request

-

You've just made a really naughty request. Maybe I'll buy you a toy -instead?

-

--chris

-
-Shitty Apache httpd on my shitty sever - diff --git a/err/403.html b/err/403.html deleted file mode 100644 index dab39bd..0000000 --- a/err/403.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -Chrisoft::Error! - - - - - -

403!!

-

Forbidden

-

You're not allowed to do that.

-

I'm so sorry.

-

--chris

-
-Shitty Apache httpd on my shitty sever - diff --git a/err/404.html b/err/404.html deleted file mode 100644 index 50b2474..0000000 --- a/err/404.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - -Chrisoft::Error! - - - - - -

404!!

-

Not Found

-

You have reached the Void. There's nothing here and your health -just started decreasing.

-

Run away!

-

--chris

-
-Shitty Apache httpd on my shitty sever - diff --git a/err/500.html b/err/500.html deleted file mode 100644 index a00b0ca..0000000 --- a/err/500.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -Chrisoft::Error! - - - - - -

500!!

-

Internal Server Error

-

Maybe you've just crashed my shitty CGI program. -Either report it, or just start abusing it!

-

--chris

-
-Shitty Apache httpd on my shitty sever - diff --git a/err/502.html b/err/502.html deleted file mode 100644 index 427c96d..0000000 --- a/err/502.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -Chrisoft::Error! - - - - - -

502!!

-

Bad Gateway

-

You've entered the wrong door. Or there's nothing but a wall behind -it.

-

--chris

-
-Shitty Apache httpd on my shitty sever - diff --git a/err/503.html b/err/503.html deleted file mode 100644 index 36db91f..0000000 --- a/err/503.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -Chrisoft::Error! - - - - - -

503!!

-

Service Unavailable

-

Your maid went on a strike together with my server and me. -Fire her!

-

--chris

-
-Shitty Apache httpd on my shitty sever - diff --git a/err/504.html b/err/504.html deleted file mode 100644 index 9be7d8d..0000000 --- a/err/504.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - -Chrisoft::Error! - - - - - -

504!!

-

Gateway Timeout

-

The door opened, however you saw the whole history of the humankind -through it.

-

But not the page you are looking for.

-

--chris

-
-Shitty Apache httpd on my shitty sever - -- cgit v1.2.3