aboutsummaryrefslogtreecommitdiff
path: root/ex.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-10-07 10:47:02 +0000
committerOmar Polo <op@omarpolo.com>2021-10-07 10:47:02 +0000
commit4cd25209651f224be8c34d6006ef689963ce37d5 (patch)
tree039725d48dacf6ac3d5d0115f30da1c63ad1f732 /ex.c
parent3096da4ef4418dc57f3e0b1fb1f89dceb2ca426a (diff)
one FastCGI connection per client
FastCGI is designed to multiplex requests over a single connection, so ideally the server can open only one connection per worker to the FastCGI application and that's that. Doing this kind of multiplexing makes the code harder to follow and easier to break/leak etc on the gmid side however. OpenBSD' httpd seems to open one connection per client, so why can't we too? One connection per request is still way better (lighter) than using CGI, and we can avoid all the pitfalls of the multiplexing (keeping track of "live ids", properly shut down etc...)
Diffstat (limited to 'ex.c')
-rw-r--r--ex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ex.c b/ex.c
index 59943d7..d89026a 100644
--- a/ex.c
+++ b/ex.c
@@ -420,7 +420,7 @@ handle_imsg_fcgi_req(struct imsgbuf *ibuf, struct imsg *imsg, size_t datalen)
else
fd = fcgi_open_sock(f);
- imsg_compose(ibuf, IMSG_FCGI_FD, id, 0, fd, NULL, 0);
+ imsg_compose(ibuf, IMSG_FCGI_FD, imsg->hdr.peerid, 0, fd, NULL, 0);
imsg_flush(ibuf);
}