Update request_parser.cc

handle empty form part
This commit is contained in:
Chunting Gu
2020-12-21 20:14:46 +08:00
committed by GitHub
parent 613b8ab50f
commit c3643277b2
+1 -1
View File
@@ -120,7 +120,7 @@ bool RequestParser::ParseMultipartContent(const char* data,
// Next boundary found. // Next boundary found.
// This part has ended. // This part has ended.
if (off > 2) { if (off >= 2) {
// -2 for excluding the CRLF after the data. // -2 for excluding the CRLF after the data.
part_->AppendData(pending_data_.data(), off - 2); part_->AppendData(pending_data_.data(), off - 2);