Bug 54039 - "HTTP entity too large" with no limit on the request body size
Summary: "HTTP entity too large" with no limit on the request body size
Status: RESOLVED DUPLICATE of bug 54435
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_http (show other bugs)
Version: 2.4.3
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-22 15:26 UTC by csudron
Modified: 2013-02-06 19:33 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description csudron 2012-10-22 15:26:59 UTC
Hi.

While making some tests on an Apache 2.4.3, I found something which looks like a bug to me (but maybe I'm wrong?).

The default value for "LimitRequestBody" directive is zero, which means "no limit". But, when you send a "big" request, you receive a 413 error code.


This comes from the file "mod_proxy_http.c", line 590, and a fix could be:
--- a/src/modules/proxy/mod_proxy_http.c
+++ b/src/modules/proxy/mod_proxy_http.c
@@ -587,7 +587,7 @@
               * Let it take effect if we decide to store the body in a
               * temporary file on disk.
               */
-            if (bytes_spooled + bytes > limit) {
+            if ((limit > 0) && (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;
             }
Comment 1 Christophe JAILLET 2013-02-06 19:33:51 UTC

*** This bug has been marked as a duplicate of bug 54435 ***