Skip to content

Commit

Permalink
Update extensions/civetweb/processors/ListenHTTP.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Márton Szász <[email protected]>
  • Loading branch information
adamdebreceni and szaszm authored Dec 2, 2024
1 parent 116e244 commit ed8386e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/civetweb/processors/ListenHTTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ void ListenHTTP::Handler::enqueueRequest(mg_connection *conn, const mg_request_i

if (write_body) {
session.get().write(flow_file, [&] (auto& out) {
MgConnectionInputStream mg_body{conn, req_info->content_length};
std::optional<size_t> request_size = std::nullopt;
if (req_info->content_length > 0) { request_size = gsl::narrow<size_t>(req_info->content_length); }
MgConnectionInputStream mg_body{conn, request_size};
return minifi::internal::pipe(mg_body, *out);
});
}
Expand Down

0 comments on commit ed8386e

Please sign in to comment.