Closed yixinshark closed 3 years ago
Content-Type:multipart/form-data; boundary=
I modified two places: --- a/CPPWebFramework/cwf/httpparser.cpp +++ b/CPPWebFramework/cwf/httpparser.cpp @@ -201,7 +201,7 @@ void HttpParser::doParseFiles() if(!temp.contains(HTTP::WEBKIT) && !temp.contains("--------")) body += temp + "\n"; }
diff --git a/CPPWebFramework/cwf/httpreadrequest.cpp b/CPPWebFramework/cwf/httpreadrequest.cpp index ac8bbe0..18e2dab 100644 --- a/CPPWebFramework/cwf/httpreadrequest.cpp +++ b/CPPWebFramework/cwf/httpreadrequest.cpp @@ -61,7 +61,7 @@ void HttpReadRequest::run() buildSocket(); maxUploadFile = configuration.getMaxUploadFile(); socket->setReadBufferSize(maxUploadFile);
if(socket->ConnectedState > 0)
if(socket->state() > 0)^M { if(socket->waitForReadyRead()) { @@ -82,7 +82,7 @@ void HttpReadRequest::run() request.httpParser = &parser; request.response = &response;
if(parser.contentLenght > parser.body.size())
if(!parser.readFile && parser.contentLenght > parser.body.size())^M { if(!readBody(parser, request, response)) {
Hello @yixinshark .
Thank you very much for reporting it. Can you please, open a pull request?
Best regards Herik Lima
using postman for testing Post method and has a file。 When parsing files, 30s blocking often occurs. After tracking the code, I found that it took time in the place of HttpReadRequest::readBody, and jumped out from the place of "if(spendTime >= maximumTime)". Hope to get your reply, thank you!