Skip to content

Commit

Permalink
Modified the false pos. UNMATCHED_BOUNDARY error flag
Browse files Browse the repository at this point in the history
  • Loading branch information
airween authored and Felipe Zimmerle committed Jun 12, 2018
1 parent af4afd3 commit 4d0ca94
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/request_body_processor/multipart.cc
Expand Up @@ -1483,9 +1483,15 @@ bool Multipart::process(const std::string& data, std::string *error,
m_boundary.size()) == 0)) {
char *boundary_end = m_buf + 2 + m_boundary.size();
/* if it match, AND there was a matched boundary at least,
clear the m_flag_unmatched_boundary flag */
set the m_flag_unmatched_boundary flag to 2
this indicates that there were an opened boundary, which
matches the reference, and here is the final boundary.
The flag will differ from 0, so the previous rules ("!@eq 0")
will catch all "errors", without any modification, but we can
use the new, permission mode with "@eq 1"
*/
if (m_boundary_count > 0) {
m_flag_unmatched_boundary = 0;
m_flag_unmatched_boundary = 2;
}
int is_final = 0;

Expand Down

0 comments on commit 4d0ca94

Please sign in to comment.