From c1178a287fac80182714d8782a57dbf32bf5e815 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 11 Jul 2020 15:17:42 -0400 Subject: Remove -f option I missed that there was a function to automatically detect if it's FastCGI! --- server.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'server.c') diff --git a/server.c b/server.c index afbf238..e3261be 100644 --- a/server.c +++ b/server.c @@ -75,13 +75,11 @@ static enum kcgi_err request(struct kreq *req) { } int main(int argc, char *argv[]) { - bool fastCGI = false; bool test = false; - for (int opt; 0 < (opt = getopt(argc, argv, "cfl:pr:s:"));) { + for (int opt; 0 < (opt = getopt(argc, argv, "cl:pr:s:"));) { switch (opt) { break; case 'c': test = true; - break; case 'f': fastCGI = true; break; case 'l': pageLimit = strtol(optarg, NULL, 10); break; case 'p': pagePublic = true; break; case 'r': pageRecent = strtol(optarg, NULL, 10); @@ -118,7 +116,7 @@ int main(int argc, char *argv[]) { if (test) return EX_OK; - if (fastCGI) { + if (khttp_fcgi_test()) { struct kfcgi *fcgi; enum kcgi_err error = khttp_fcgi_init( &fcgi, Keys, KeysLen, Pages, PagesLen, Networks -- cgit 1.4.1