diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-05-25 22:35:17 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-05-25 22:35:17 +0200 |
commit | 817d21e30c8d9c17cef41c4b8920dd8004fad1f6 (patch) | |
tree | 543beb15c18cf208f5f2343219d67ac14d3be23a /plugins | |
parent | 4b34a4d950f762b5d020d5ac4d3354836833039c (diff) |
fcgi: Fix empty stderr message
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/fcgi/fcgi.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 |