summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-10-10 20:28:57 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-10-10 20:28:57 +0000
commita957254e79a8cfaf4c79da138b6531c6ec324b36 (patch)
treece9baf23697b62f3fe76e7091e407548e6aaf3d4 /libs
parent676203d1fc8243476267fdb7ac6d1ef955397e52 (diff)
* luci/libs/httpprotocol: store QUERY_STRING in environment too, fixes query strings with luci-httpd and propably others
Diffstat (limited to 'libs')
-rw-r--r--libs/http/luasrc/http/protocol.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/http/luasrc/http/protocol.lua b/libs/http/luasrc/http/protocol.lua
index ab696d58c..6240953d0 100644
--- a/libs/http/luasrc/http/protocol.lua
+++ b/libs/http/luasrc/http/protocol.lua
@@ -568,7 +568,9 @@ function parse_message_header( src )
REQUEST_URI = msg.request_uri;
SCRIPT_NAME = msg.request_uri:gsub("?.+$","");
SCRIPT_FILENAME = ""; -- XXX implement me
- SERVER_PROTOCOL = "HTTP/" .. string.format("%.1f", msg.http_version)
+ SERVER_PROTOCOL = "HTTP/" .. string.format("%.1f", msg.http_version);
+ QUERY_STRING = msg.request_uri:match("?")
+ and msg.request_uri:gsub("^.+?","") or ""
}
-- Populate HTTP_* environment variables