mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-14 16:58:30 +00:00
Fix #1545
This commit is contained in:
parent
21f9c51556
commit
d587548250
2 changed files with 21 additions and 6 deletions
|
@ -4941,10 +4941,9 @@ inline void Response::set_content(const std::string &s,
|
|||
inline void Response::set_content_provider(
|
||||
size_t in_length, const std::string &content_type, ContentProvider provider,
|
||||
ContentProviderResourceReleaser resource_releaser) {
|
||||
assert(in_length > 0);
|
||||
set_header("Content-Type", content_type);
|
||||
content_length_ = in_length;
|
||||
content_provider_ = std::move(provider);
|
||||
if (in_length > 0) { content_provider_ = std::move(provider); }
|
||||
content_provider_resource_releaser_ = resource_releaser;
|
||||
is_chunked_content_provider_ = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue