diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-02-12 18:54:34 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-02-12 18:54:34 +0100 |
commit | aa79e8701d39de2a24b2de7b97d3fc137e87b27b (patch) | |
tree | 88af00d49ee97f2d113baed3ecbd17e0305b775d /plugins/fcgi/webapp-runner.cpp | |
parent | 3282755c3798b695177c961a5745267cda6c21c4 (diff) |
Enable multiple arguments for FCGI app when run via webapp-runner
Diffstat (limited to 'plugins/fcgi/webapp-runner.cpp')
-rw-r--r-- | plugins/fcgi/webapp-runner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<unsigned short>(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(); |