diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/cgi/cgi.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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); } |