diff --git a/lib/src/MultiPart.cc b/lib/src/MultiPart.cc index fc6848cf..72f42805 100644 --- a/lib/src/MultiPart.cc +++ b/lib/src/MultiPart.cc @@ -52,8 +52,16 @@ const SafeStringMap &MultiPartParser::getParameters() const int MultiPartParser::parse(const HttpRequestPtr &req) { - if (req->method() != Post && req->method() != Put) - return -1; + switch (req->method()) + { + case Post: + case Put: + case Patch: + break; + default: + return -1; + } + const std::string &contentType = static_cast(req.get())->getHeaderBy("content-type"); if (contentType.empty())