1
0
ithewei 6 жил өмнө
parent
commit
45e021d31a

+ 1 - 1
http/http_content.cpp

@@ -237,7 +237,7 @@ struct multipart_parser_userdata {
     }
 
     void handle_data() {
-        if (name.c_str() != 0) {
+        if (name.size() != 0) {
             (*mp)[name] = FormData(part_data.c_str(), filename.c_str());
         }
         name.clear();

+ 0 - 8
http/http_content.h

@@ -84,14 +84,6 @@ struct FormData {
             this->filename = filename;
         }
     }
-    FormData(const char* c_str, bool file = false) {
-        if (c_str) {
-            file ? filename = c_str : content = c_str;
-        }
-    }
-    FormData(const std::string& str, bool file = false) {
-        file ? filename = str : content = str;
-    }
     FormData(int n) {
         content = std::to_string(n);
     }