summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-06-01 18:30:41 +0000
committerSteven Barth <steven@midlink.org>2009-06-01 18:30:41 +0000
commit8a3f3e860a7e0595007c344e0fdbbba334d2f404 (patch)
tree443e862306e38fb932787be7b9b5baa43574fcd1
parent217af86e3560b585524481e6d98b94b6dfe6a7f3 (diff)
Fix query string detection
-rw-r--r--libs/lucid-http/luasrc/lucid/http/server.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/libs/lucid-http/luasrc/lucid/http/server.lua b/libs/lucid-http/luasrc/lucid/http/server.lua
index 70a172621..67e917892 100644
--- a/libs/lucid-http/luasrc/lucid/http/server.lua
+++ b/libs/lucid-http/luasrc/lucid/http/server.lua
@@ -343,13 +343,8 @@ function Server.parse_headers(self, source)
break
end
until false
-
- if env.REQUEST_URI:find("?") then
- env.SCRIPT_NAME, env.QUERY_STRING = env.REQUEST_URI:match("([^%?]*)%?(.*)")
- else
- env.SCRIPT_NAME, env.QUERY_STRING = env.REQUEST_URI, nil
- end
-
+
+ env.SCRIPT_NAME, env.QUERY_STRING = env.REQUEST_URI:match("([^?]*)%??(.*)")
return req
end