aboutsummaryrefslogtreecommitdiff
path: root/fcgi.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-10-04 09:31:43 +0000
committerOmar Polo <op@omarpolo.com>2021-10-04 09:31:43 +0000
commitd046e4d6b500583cda8d2561e47c790eaedd007f (patch)
treedc8161b7b92fc15c058e06c9bda132dace49ddec /fcgi.c
parent4a2a525d7c3013f3c4b5669db9fdbb84d8d77946 (diff)
copy only `len' bytes, not the whole buffer
We ended up copying too much data from the fastcgi process.
Diffstat (limited to 'fcgi.c')
-rw-r--r--fcgi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fcgi.c b/fcgi.c
index c87a0e6..26da55c 100644
--- a/fcgi.c
+++ b/fcgi.c
@@ -334,7 +334,8 @@ fcgi_read(struct bufferevent *bev, void *d)
break;
case FCGI_STDOUT:
- bufferevent_write_buffer(c->bev, EVBUFFER_INPUT(bev));
+ bufferevent_write(c->bev, EVBUFFER_DATA(src), len);
+ evbuffer_drain(src, len);
break;
default: