瀏覽代碼

fix parse_query_params when value includes '='

ithewei 1 年之前
父節點
當前提交
6d23a08c42
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      http/http_content.cpp

+ 1 - 1
http/http_content.cpp

@@ -43,7 +43,7 @@ int parse_query_params(const char* query_string, QueryParams& query_params) {
             state = s_key;
             state = s_key;
             key = p+1;
             key = p+1;
         }
         }
-        else if (*p == '=') {
+        else if (*p == '=' && state == s_key) {
             state = s_value;
             state = s_value;
             value = p+1;
             value = p+1;
         }
         }