From 491e246f65ddb4ec7d0e810f47b7db537be4c382 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 6 Jan 2022 19:06:37 +0100 Subject: Bugfix for CGI: Process read --- plugins/cgi/cgi.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins/cgi/cgi.cpp') diff --git a/plugins/cgi/cgi.cpp b/plugins/cgi/cgi.cpp index 131855e..b2af9fa 100644 --- a/plugins/cgi/cgi.cpp +++ b/plugins/cgi/cgi.cpp @@ -157,7 +157,6 @@ namespace { std::string output; std::string line; - // TODO: C++20 coroutine coro_t::push_type processLine( [&](coro_t::pull_type& in){ std::string line; // read header lines @@ -183,7 +182,7 @@ namespace { throw std::runtime_error("Input missing on processing CGI body"); }); - while (child.running() && std::getline(is_out, line)) { + while (std::getline(is_out, line) && !is_out.eof()) { processLine(line); } -- cgit v1.2.3