From aa79e8701d39de2a24b2de7b97d3fc137e87b27b Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 12 Feb 2023 18:54:34 +0100 Subject: Enable multiple arguments for FCGI app when run via webapp-runner --- plugins/fcgi/webapp-runner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/fcgi/webapp-runner.cpp') diff --git a/plugins/fcgi/webapp-runner.cpp b/plugins/fcgi/webapp-runner.cpp index 64268f3..ad8c396 100644 --- a/plugins/fcgi/webapp-runner.cpp +++ b/plugins/fcgi/webapp-runner.cpp @@ -30,16 +30,16 @@ webapp-runner fcgi-socket0 ./fcgi1 int main(int argc, char* argv[]) { try { - if (argc == 3) { + if (argc >= 3) { std::string address{argv[1]}; std::string command{argv[2]}; if (auto pos{address.find_last_of(':')}; pos != std::string::npos) { std::string host{address.substr(0, pos)}; unsigned short port{static_cast(std::stoul(address.substr(pos + 1)))}; - run_fcgi_app(command, host, port); + run_fcgi_app(command, host, port, argc - 2, &argv[2]); } else { - run_fcgi_app(command, address); + run_fcgi_app(command, address, argc - 2, &argv[2]); } } else { usage(); -- cgit v1.2.3