projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a2bb35
)
lucid: fix separation of query string and url in server handler
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 1 Jun 2009 18:10:37 +0000
(18:10 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 1 Jun 2009 18:10:37 +0000
(18:10 +0000)
libs/lucid-http/luasrc/lucid/http/server.lua
patch
|
blob
|
history
diff --git
a/libs/lucid-http/luasrc/lucid/http/server.lua
b/libs/lucid-http/luasrc/lucid/http/server.lua
index 21a752c68b8106b285cdcb14139d9220bc40900b..70a17262186ad93330d1b5810fd9ea65fa37e2a8 100644
(file)
--- a/
libs/lucid-http/luasrc/lucid/http/server.lua
+++ b/
libs/lucid-http/luasrc/lucid/http/server.lua
@@
-343,8
+343,13
@@
function Server.parse_headers(self, source)
break
end
until false
-
- env.SCRIPT_NAME, env.QUERY_STRING = env.REQUEST_URI:match("(.*)%??(.*)")
+
+ 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
+
return req
end