summaryrefslogtreecommitdiffhomepage
path: root/plugins/fcgi/webapp-runner.cpp
diff options
context:
space:
mode:
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();