]> git.plutz.net Git - cgilite/blobdiff - server.sh
fill REQUEST_URI variable
[cgilite] / server.sh
index a4229b252c90a409348c909e85df6f6027ff3384..0cb43ffbc57cef49e45c951b7e4194a87df15704 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