summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/http/protocol.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-06-15 04:01:38 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-06-15 04:01:38 +0000
commit6d3ac58b4216a81d9a2809401f22c2d053c9b354 (patch)
tree341cfcb6d0865de9ca9e4c7b73dd30570cae38f7 /libs/web/luasrc/http/protocol.lua
parent6571e9ba6f945c1b454e7f08361acc3a6fb70280 (diff)
* luci/libs: fix get parameter handling in http.protocol
Diffstat (limited to 'libs/web/luasrc/http/protocol.lua')
-rw-r--r--libs/web/luasrc/http/protocol.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/web/luasrc/http/protocol.lua b/libs/web/luasrc/http/protocol.lua
index 524a4c329a..bb0bd3a2ea 100644
--- a/libs/web/luasrc/http/protocol.lua
+++ b/libs/web/luasrc/http/protocol.lua
@@ -360,8 +360,12 @@ function parse_message( data, filecb )
local clen = ( hdrs['Content-Length'] or HTTP_MAX_CONTENT ) + 0
-- Process get parameters
- if method == "get" or method == "post" then
+ if ( method == "get" or method == "post" ) and
+ message.request_uri:match("?")
+ then
message.params = urldecode_params( message.request_uri )
+ else
+ message.params = { }
end
-- Process post method