From 817d21e30c8d9c17cef41c4b8920dd8004fad1f6 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 25 May 2020 22:35:17 +0200 Subject: fcgi: Fix empty stderr message --- plugins/fcgi/fcgi.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/fcgi') diff --git a/plugins/fcgi/fcgi.cpp b/plugins/fcgi/fcgi.cpp index 7748845..6f4ad1f 100644 --- a/plugins/fcgi/fcgi.cpp +++ b/plugins/fcgi/fcgi.cpp @@ -438,7 +438,9 @@ std::string fcgi_plugin::fcgiQuery(FCGIContext& context) } else if (r.getType() == FCGI_STDOUT) { output_data += r.getContent(); } else if (r.getType() == FCGI_STDERR) { - std::cerr << "FCGI STDERR: " << r.getContent() << std::endl; + std::string msg {r.getContent()}; + if (!msg.empty()) // final FCGI_STDERR sends empty message: ignore + std::cerr << "FCGI STDERR: " << msg << std::endl; } else if (r.getType() == FCGI_GET_VALUES_RESULT) { FCGI_DecodeEnv(r.getContent(), app_values); } else -- cgit v1.2.3