mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix #1017
This commit is contained in:
parent
887074efd2
commit
469c6bc2b6
1 changed files with 1 additions and 1 deletions
|
@ -256,6 +256,7 @@ svr.Post("/multipart", [&](const auto& req, auto& res) {
|
|||
svr.Post("/content_receiver",
|
||||
[&](const Request &req, Response &res, const ContentReader &content_reader) {
|
||||
if (req.is_multipart_form_data()) {
|
||||
// NOTE: `content_reader` is blocking until every form data field is read
|
||||
MultipartFormDataItems files;
|
||||
content_reader(
|
||||
[&](const MultipartFormData &file) {
|
||||
|
@ -272,7 +273,6 @@ svr.Post("/content_receiver",
|
|||
body.append(data, data_length);
|
||||
return true;
|
||||
});
|
||||
res.set_content(body, "text/plain");
|
||||
}
|
||||
});
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue