Bug 1372684 - Apache httpd does not log status code "413" in access_log when exceeding LimitRequestBody
Summary: Apache httpd does not log status code "413" in access_log when exceeding Limi...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: httpd
Version: 6.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-02 11:22 UTC by Masafumi Miura
Modified: 2019-12-16 06:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-07 22:14:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Masafumi Miura 2016-09-02 11:22:38 UTC
### Description of problem:

Apache httpd does not log status code "413" in access_log when hitting LimitRequestBody. It logs status code "200" instead. 


### Version-Release number of selected component (if applicable):

httpd-2.2.15-54.el6_8.x86_64


### How reproducible:

Anytime


### Steps to Reproduce:

1. Configure LimitRequestBody and mod_ext_filter:

    LimitRequestBody 100

2. Prepare a test file which is larger than LimitRequestBody

    dd if=/dev/zero of=/tmp/testfile bs=1 count=101

3. Sent a POST request with the file 

    curl -X POST -vs -T /tmp/testfile http://127.0.0.1/index.html

   or

    curl -X POST -vs -H "Transfer-Encoding: chunked" -F "test=@/tmp/testfile" http://127.0.0.1/index.html


### Actual results:

"413 Request Entity Too Large" was returned to the client (curl) and the following log messages were output in error_log:

~~~
[Fri Sep 01 18:51:38 2016] [error] [client 127.0.0.1] Requested content-length of 101 is larger than the configured limit of 100
[Fri Sep 01 18:52:49 2016] [info] [client 127.0.0.1] Read content length of 152 is larger than the configured limit of 100
~~~

But status code 413 was not logged but status code 200 was logged instead in access_log:

~~~
127.0.0.1 - - [01/Sep/2016:18:51:38 +0900] "POST /index.html HTTP/1.1" 200 415 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2"
127.0.0.1 - - [01/Sep/2016:18:52:49 +0900] "POST /index.html HTTP/1.1" 200 415 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2"
~~~


### Expected results:

status code 413 should be output in access_log.

Comment 4 Chris Williams 2017-06-07 22:14:24 UTC
Red Hat Enterprise Linux 6 transitioned to the Production 3 Phase on May 10, 2017.  During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not appear to meet the inclusion criteria for the Production Phase 3 and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification.  Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com


Note You need to log in before you can comment on or make changes to this bug.