summaryrefslogtreecommitdiffhomepage
path: root/plugins/fcgi/webapp-runner.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-02-12 18:54:34 +0100
committerRoland Reichwein <mail@reichwein.it>2023-02-12 18:54:34 +0100
commitaa79e8701d39de2a24b2de7b97d3fc137e87b27b (patch)
tree88af00d49ee97f2d113baed3ecbd17e0305b775d /plugins/fcgi/webapp-runner.cpp
parent3282755c3798b695177c961a5745267cda6c21c4 (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.cpp6
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();