* luci/libs: fix get parameter handling in http.protocol
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 15 Jun 2008 04:01:38 +0000 (04:01 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 15 Jun 2008 04:01:38 +0000 (04:01 +0000)
libs/web/luasrc/http/protocol.lua

index 524a4c3..bb0bd3a 100644 (file)
@@ -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