Commit e52f3806 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1739201 from trunk:

http: Respond with "408 Request Timeout" when a timeout occurs while
reading the request body.

Submitted by: ylavic
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1768079 13f79535-47bb-0310-9956-ffa450edef68
parent 3f874e8d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@ Changes with Apache 2.4.24
     than running with the modified XFF but original TCP address.
     PR 49839/PR 60251

  *) http: Respond with "408 Request Timeout" when a timeout occurs while
     reading the request body.  [Yann Ylavic]

  *) mod_http2: connection shutdown revisited: corrected edge cases on
     shutting down ongoing streams, changed log warnings to be less noisy
     when waiting on long running tasks. [Stefan Eissing]
+0 −6
Original line number Diff line number Diff line
@@ -117,12 +117,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) http: Respond with "408 Request Timeout" when a timeout occurs while
     reading the request body.  PR 60313.
     trunk patch: http://svn.apache.org/r1739201
     2.4.x patch: http://home.apache.org/~ylavic/patches/httpd-2.4.x-r1739201.patch
                  (w/o the APR_EGENERAL case added in r1482918, not in 2.4.x)
     +1: ylavic, covener, jim


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
+10 −10
Original line number Diff line number Diff line
@@ -1392,23 +1392,23 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
AP_DECLARE(int) ap_map_http_request_error(apr_status_t rv, int status)
{
    switch (rv) {
    case AP_FILTER_ERROR: {
    case AP_FILTER_ERROR:
        return AP_FILTER_ERROR;
    }
    case APR_ENOSPC: {

    case APR_ENOSPC:
        return HTTP_REQUEST_ENTITY_TOO_LARGE;
    }
    case APR_ENOTIMPL: {

    case APR_ENOTIMPL:
        return HTTP_NOT_IMPLEMENTED;
    }
    case APR_ETIMEDOUT: {

    case APR_TIMEUP:
    case APR_ETIMEDOUT:
        return HTTP_REQUEST_TIME_OUT;
    }
    default: {

    default:
        return status;
    }
}
}

/* In HTTP/1.1, any method can have a body.  However, most GET handlers
 * wouldn't know what to do with a request body if they received one.