소스 검색

named parameted in POST

Danja Vasiliev 10 년 전
부모
커밋
8f9d454033
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  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