Commit 5ffe1504 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'fix_mime_parser' into 'develop'

Fix small issue for Mime parser for normal message

See merge request oai/cn5g/oai-cn5g-smf!142
parents 94595c1d 6f894d2a
...@@ -33,8 +33,10 @@ bool mime_parser::parse(const std::string& str) { ...@@ -33,8 +33,10 @@ bool mime_parser::parse(const std::string& str) {
// find boundary // find boundary
std::size_t content_type_pos = str.find("Content-Type"); // first part std::size_t content_type_pos = str.find("Content-Type"); // first part
// For normal message -> don't need to parse (number of parts = 0)
if ((content_type_pos <= 4) or (content_type_pos == std::string::npos)) if ((content_type_pos <= 4) or (content_type_pos == std::string::npos))
return false; return true;
std::string boundary_str = std::string boundary_str =
str.substr(2, content_type_pos - 4); // 2 for -- and 2 for CRLF str.substr(2, content_type_pos - 4); // 2 for -- and 2 for CRLF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment