From a42ea5a5814113e6952b97f597a78d1061a3f9ea Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sat, 7 Dec 2024 11:36:18 +0000 Subject: Update --- bin/mail/comment.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bin/mail/comment.sh') diff --git a/bin/mail/comment.sh b/bin/mail/comment.sh index 8d36e32..20ecb1e 100755 --- a/bin/mail/comment.sh +++ b/bin/mail/comment.sh @@ -25,6 +25,20 @@ # # +# 0. Work as CGI {{{ + +# Print this script as HTTP Response +if [ -n "$REQUEST_METHOD" ]; then + <<-RESPONSE cat + Status: 200 + Content-Type: text/plain + + $(cat $0) + RESPONSE + exit 0 +fi + +# }}} # 1. Check mail is for comment {{{ # Restore mail into variables -- cgit v1.2.3-70-g09d2