From c836cdfadb29dde5f7afee662a27e9d691bb9ba0 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Mon, 29 Mar 2021 09:42:06 +0000 Subject: handle CGI scripts that replies with the maximum header length allowed the 1024 bytes limits is for the META only, not for the whole response. That means that the maximum size for the header line is 1029! --- gmid.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gmid.h') diff --git a/gmid.h b/gmid.h index 7e9bba0..8188bf9 100644 --- a/gmid.h +++ b/gmid.h @@ -180,8 +180,11 @@ struct client { const char *meta; int fd, pfd; DIR *dir; - char sbuf[1024]; + + /* big enough to store STATUS + SPACE + META + CRLF */ + char sbuf[1029]; ssize_t len, off; + struct sockaddr_storage addr; struct vhost *host; /* host they're talking to */ }; -- cgit v1.2.3