#
-# $Id: cf.data.pre,v 1.356 2004/09/26 21:35:41 hno Exp $
+# $Id: cf.data.pre,v 1.357 2004/09/26 21:40:29 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
NAME: request_header_max_size
COMMENT: (KB)
TYPE: b_size_t
-DEFAULT: 10 KB
+DEFAULT: 20 KB
LOC: Config.maxRequestHeaderSize
DOC_START
This specifies the maximum size for HTTP headers in a request.
/*
- * $Id: client_side.cc,v 1.671 2004/08/30 03:28:58 robertc Exp $
+ * $Id: client_side.cc,v 1.672 2004/09/26 21:40:29 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
if (http_version)
http_version = inbuf + (http_version - conn->in.buf);
+ /* Enforce max_request_size */
+
+ if (req_sz >= Config.maxRequestHeaderSize) {
+ debug(33, 5) ("parseHttpRequest: Too large request\n");
+ xfree(inbuf);
+ return parseHttpRequestAbort(conn, "error:request-too-large");
+ }
+
/* Barf on NULL characters in the headers */
if (strlen(inbuf) != req_sz) {
debug(33, 1) ("parseHttpRequest: Requestheader contains NULL characters\n");