Fixed HTTP stack to parse urlencoded data from Internet Explorer correctly
[project/luci.git] / libs / http / luasrc / http / protocol.lua
index fd0a046..93c9e79 100644 (file)
@@ -500,7 +500,7 @@ function urldecode_message_body( src, msg )
                                if spos then
                                        local pair = data:sub( spos, epos - 1 )
                                        local key  = pair:match("^(.-)=")
-                                       local val  = pair:match("=(.*)$")
+                                       local val  = pair:match("=([^%s]*)%s*$")
 
                                        if key and #key > 0 then
                                                __initval( msg.params, key )