Browse Source

named parameted in POST

Danja Vasiliev 10 years ago
parent
commit
8f9d454033
1 changed files with 7 additions and 0 deletions
  1. 7 0
      openwrt/common/www/lib/cgi/post.sh

+ 7 - 0
openwrt/common/www/lib/cgi/post.sh

@@ -84,10 +84,17 @@ errorCheck() {
   exit $_ERR
 }
 
+## get data from argv=data pair in POST request
+## (any 4 character arg in the beginning of string is matched)
+postGetData() {
+  _POST="${_POST##????'='}"
+}
+
 ## urlencoded POST dispatcher
 postUrlenc() {
   ## decode stream
   _POST=$(urlDecode "$(< $_POST_TMP)")  ## decode global $_POST
+  postGetData
   case "${_REQUEST_URI}" in
     \/cmd) postCmd  ;;  ## handle /cmd POST
         *) postHtml ;;  ## handle html POST