aboutsummaryrefslogtreecommitdiffstats
path: root/src/tipideed/cgi.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-03-22 06:57:51 +0000
committerLaurent Bercot <ska@appnovation.com>2025-03-22 06:57:51 +0000
commitbfdd8182f9a098d400c83fd43c70cbb2ccc94264 (patch)
tree7f784190087e8dd2ada6f67dfe64e1348c6a114a /src/tipideed/cgi.c
parent9cd4e0d1902ebb196ebd53ed7ee88e6689d801b7 (diff)
downloadtipidee-bfdd8182f9a098d400c83fd43c70cbb2ccc94264.tar.gz
Implement autochunk
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/tipideed/cgi.c')
-rw-r--r--src/tipideed/cgi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tipideed/cgi.c b/src/tipideed/cgi.c
index fbf08c7..7954ac9 100644
--- a/src/tipideed/cgi.c
+++ b/src/tipideed/cgi.c
@@ -184,7 +184,7 @@ static inline int do_cgi (tipidee_rql *rql, char const *docroot, char const *con
int r ;
tipidee_headers hdr ;
char hdrbuf[4096] ;
- char buf[4096] ;
+ char buf[BUFFER_OUTSIZE - 16] ; /* leave room for chunk encoding */
iopause_fd x[2] = { { .events = IOPAUSE_READ }, { .events = IOPAUSE_WRITE } } ;
size_t bodyw = 0 ;
tain deadline ;
@@ -205,7 +205,7 @@ static inline int do_cgi (tipidee_rql *rql, char const *docroot, char const *con
close(x[1].fd) ;
x[1].fd = -1 ;
}
- buffer_init(&b, &buffer_read, x[0].fd, buf, 4096) ;
+ buffer_init(&b, &buffer_read, x[0].fd, buf, BUFFER_OUTSIZE - 16) ;
tain_add_g(&deadline, &g.cgitto) ;
for (;;)