diff options
author | Omar Polo <op@omarpolo.com> | 2021-10-07 10:47:02 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-10-07 10:47:02 +0000 |
commit | 4cd25209651f224be8c34d6006ef689963ce37d5 (patch) | |
tree | 039725d48dacf6ac3d5d0115f30da1c63ad1f732 /ex.c | |
parent | 3096da4ef4418dc57f3e0b1fb1f89dceb2ca426a (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |