summary refs log tree commit diff
path: root/server.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-11 15:17:42 -0400
committerJune McEnroe <june@causal.agency>2020-07-11 15:17:42 -0400
commitc1178a287fac80182714d8782a57dbf32bf5e815 (patch)
treeb4b2a184c70f81f5a25ef5dab9967e4a1a2fd157 /server.c
parentPreserve search query when clicking network or context columns (diff)
downloadscooper-c1178a287fac80182714d8782a57dbf32bf5e815.tar.gz
scooper-c1178a287fac80182714d8782a57dbf32bf5e815.zip
Remove -f option
I missed that there was a function to automatically detect if it's
FastCGI!
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 2 insertions, 4 deletions
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