diff --git a/README.md b/README.md index 324ed92e..3b6c89c3 100755 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ int main() Drogon provides some interfaces for adding controller logic directly in the main() function, for example, user can register a handler like this in Drogon: ```c++ -app.registerHandler("/test?username={name}", +app().registerHandler("/test?username={name}", [](const HttpRequestPtr& req, std::function &&callback, const std::string &name) diff --git a/README.zh-CN.md b/README.zh-CN.md index b093ff65..319b8e78 100755 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -70,7 +70,7 @@ int main() 当然,Drogon也提供了一些接口,使用户可以在main()函数中直接添加控制器逻辑,比如,用户可以注册一个lambda处理器到drogon框架中,如下所示: ```c++ -app.registerHandler("/test?username={name}", +app().registerHandler("/test?username={name}", [](const HttpRequestPtr& req, std::function &&callback, const std::string &name) diff --git a/lib/src/HttpUtils.cc b/lib/src/HttpUtils.cc index 1b145018..dc3f810a 100644 --- a/lib/src/HttpUtils.cc +++ b/lib/src/HttpUtils.cc @@ -1,6 +1,6 @@ /** * - * HttpUtils.h + * @file HttpUtils.h * An Tao * * Copyright 2018, An Tao. All rights reserved. @@ -567,7 +567,8 @@ ContentType parseContentType(const string_view &contentType) {"image/bmp", CT_IMAGE_BMP}, {"image/icns", CT_IMAGE_ICNS}, {"application/wasm", CT_APPLICATION_WASM}, - {"text/plain", CT_TEXT_PLAIN}}; + {"text/plain", CT_TEXT_PLAIN}, + {"multipart/form-data", CT_MULTIPART_FORM_DATA}}; auto iter = map_.find(contentType); if (iter == map_.end()) return CT_NONE;