We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df1ff75 commit f6a2365Copy full SHA for f6a2365
httplib.h
@@ -2078,17 +2078,15 @@ class MultipartFormDataParser {
2078
break;
2079
}
2080
case 4: { // Boundary
2081
- auto pos = buf_.find(crlf_);
2082
if (crlf_.size() > buf_.size()) { return true; }
2083
- if (pos == 0) {
+ if (buf_.find(crlf_) == 0) {
2084
buf_.erase(0, crlf_.size());
2085
off_ += crlf_.size();
2086
state_ = 1;
2087
} else {
2088
auto pattern = dash_ + crlf_;
2089
if (pattern.size() > buf_.size()) { return true; }
2090
- auto pos = buf_.find(pattern);
2091
+ if (buf_.find(pattern) == 0) {
2092
buf_.erase(0, pattern.size());
2093
off_ += pattern.size();
2094
is_valid_ = true;
0 commit comments