1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

use a liberal default limit for LimitRequestBody of 1GB

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901497 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Covener
2022-06-01 12:30:46 +00:00
parent 0c2910f074
commit 92499e2003
5 changed files with 12 additions and 27 deletions

View File

@@ -4292,13 +4292,10 @@ PROXY_DECLARE(int) ap_proxy_spool_input(request_rec *r,
apr_bucket *e;
apr_off_t bytes, fsize = 0;
apr_file_t *tmpfile = NULL;
apr_off_t limit;
*bytes_spooled = 0;
body_brigade = apr_brigade_create(p, bucket_alloc);
limit = ap_get_limit_req_body(r);
do {
if (APR_BRIGADE_EMPTY(input_brigade)) {
rv = ap_proxy_read_input(r, backend, input_brigade,
@@ -4316,17 +4313,6 @@ PROXY_DECLARE(int) ap_proxy_spool_input(request_rec *r,
apr_brigade_length(input_brigade, 1, &bytes);
if (*bytes_spooled + bytes > max_mem_spool) {
/*
* LimitRequestBody does not affect Proxy requests (Should it?).
* Let it take effect if we decide to store the body in a
* temporary file on disk.
*/
if (limit && (*bytes_spooled + bytes > limit)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01088)
"Request body is larger than the configured "
"limit of %" APR_OFF_T_FMT, limit);
return HTTP_REQUEST_ENTITY_TOO_LARGE;
}
/* can't spool any more in memory; write latest brigade to disk */
if (tmpfile == NULL) {
const char *temp_dir;