fill REQUEST_URI variable
authorpaul <paul@plutz.net>
Thu, 24 Nov 2016 14:36:46 +0000 (14:36 +0000)
committerpaul <paul@plutz.net>
Thu, 24 Nov 2016 14:36:46 +0000 (14:36 +0000)
svn path=/trunk/; revision=43

server.sh

index a4229b2..0cb43ff 100755 (executable)
--- a/server.sh
+++ b/server.sh
@@ -34,6 +34,10 @@ sed -unr '
     h
     s;^(GET|HEAD|POST) ([^\?]*)\??(.+)? (HTTP\/[0-9]\.[0-9])\r?$;export REQUEST_METHOD='\''\1'\'';p
     g
+    s;^(GET|HEAD|POST) ([^\?]*\??.*) (HTTP\/[0-9]\.[0-9])\r?$;\2;
+    s;'\'';'\''\\'\'''\'';g
+    s;^.*$;export REQUEST_URI='\''&'\'';p
+    g
     s;^(GET|HEAD|POST) ([^\?]*)\??(.+)? (HTTP\/[0-9]\.[0-9])\r?$;\2;
     s;'\'';'\''\\'\'''\'';g
     s;^.*$;export PATH_INFO='\''&'\'';p