aboutsummaryrefslogtreecommitdiff
path: root/gmid.h
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-03-29 09:42:06 +0000
committerOmar Polo <op@omarpolo.com>2021-03-29 09:42:06 +0000
commitc836cdfadb29dde5f7afee662a27e9d691bb9ba0 (patch)
treee048668b5bd22add0e95fb933a84d3b989ac49cd /gmid.h
parent071dce449d98389d76d1bfaef31363664d0dfdda (diff)
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!
Diffstat (limited to 'gmid.h')
-rw-r--r--gmid.h5
1 files changed, 4 insertions, 1 deletions
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 */
};