From 8b6bc295a129d0f5f6e2163fb8d57347942d71d9 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@sbcglobal.net>
Date: Mon, 9 Jan 2017 20:41:53 -0500
Subject: implement case-insensitive URLs

---
 bin/lowercase.cgi | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 bin/lowercase.cgi

(limited to 'bin/lowercase.cgi')

diff --git a/bin/lowercase.cgi b/bin/lowercase.cgi
new file mode 100644
index 0000000..376ad54
--- /dev/null
+++ b/bin/lowercase.cgi
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+uri="${REQUEST_SCHEME:-http}://${HTTP_HOST}${PATH_INFO}"
+if test -n "$QUERY_STRING"; then
+	uri+="?$QUERY_STRING"
+fi
+printf '%s\r\n' \
+	"Location: $uri" \
+	''
-- 
cgit v1.2.3-2-g168b