diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2017-11-15 19:03:27 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2017-11-15 19:03:27 +0000 |
commit | ac841f3af1120b9daf6616cd3d0cf9569ea54bcb (patch) | |
tree | 32b6512bfe4f331e72c4a3cc02c34399f84550b5 /usr.sbin/relayd/relay_http.c | |
parent | bb3eb71bdbbd9592d1ab5e5ddf89fa6b9e24f0b9 (diff) |
make the maximum size of http headers configurable in the protocol.
ok bluhm@, >8k makes sense claudio@
Diffstat (limited to 'usr.sbin/relayd/relay_http.c')
-rw-r--r-- | usr.sbin/relayd/relay_http.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c index 2bd6952bbeb..3b6f8e84e37 100644 --- a/usr.sbin/relayd/relay_http.c +++ b/usr.sbin/relayd/relay_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay_http.c,v 1.67 2017/09/23 11:56:57 bluhm Exp $ */ +/* $OpenBSD: relay_http.c,v 1.68 2017/11/15 19:03:26 benno Exp $ */ /* * Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -187,9 +187,10 @@ relay_read_http(struct bufferevent *bev, void *arg) /* Limit the total header length minus \r\n */ cre->headerlen += linelen; - if (cre->headerlen > RELAY_MAXHEADERLENGTH) { + if (cre->headerlen > proto->httpheaderlen) { free(line); - relay_abort_http(con, 413, "request too large", 0); + relay_abort_http(con, 413, + "request headers too large", 0); return; } |