* 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 524a4c329aebf649fb61cf68672164df320007a4..bb0bd3a2ea120987ac5e72ece2785d1bba4df581 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