- content+="Content-Type: "+mime+"\r\n";\r
- content+="Content-Length: "+lenstr+"\r\n\r\n";\r
- content+=std::string(data.begin(),data.end());\r
+ // mime type should be short and have a / in it - otherwise skip\r
+ if(mime.size()<50 && mime.find("/")!=std::string::npos)\r
+ {\r
+ content+="Content-Type: "+mime+"\r\n";\r
+ content+="Content-Length: "+lenstr+"\r\n\r\n";\r
+ content+=std::string(data.begin(),data.end());\r
+ }\r