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

Merge r1646282 from trunk:

* Fix If-Match handling:
  - We need to fail if we do NOT match.
  - ETag comparison only makes sense if we have an ETag

PR: 57358
Submitted by: Kunihiko Sakamoto <ksakamoto google.com>
Reviewed by: rpluem

Submitted by: rpluem
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1674658 13f79535-47bb-0310-9956-ffa450edef68
parent 5691e947
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,9 @@ Changes with Apache 2.4.13
     calls r:wsupgrade() can cause a child process crash. 
     [Edward Lu <Chaosed0 gmail.com>]

  *) mod_http: Fix incorrect If-Match handling. PR 57358
     [Kunihiko Sakamoto <ksakamoto google.com>]

  *) ssl: Add a warning if protocol given in SSLProtocol or SSLProxyProtocol
     will override other parameters given in the same directive. This could be
     a missing + or - prefix.  PR 52820 [Christophe Jaillet]
+0 −5
Changes for STATUS: 0 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -105,11 +105,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) mod_http: Fix incorrect If-Match handling. PR 57358.
     trunk patch: http://svn.apache.org/r1646282
     2.4.x patch: trunk works (modulo CHANGES)
     +1: ylavic, covener, jim

  *) mod_status: Improve server-status output when called with "?auto"
     (machine readable form).
     trunk patch: http://svn.apache.org/r1671396
+2 −5
Changes for modules/http/http_protocol.c: 2 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -316,8 +316,8 @@ AP_DECLARE(ap_condition_e) ap_condition_if_match(request_rec *r,
     */
    if ((if_match = apr_table_get(r->headers_in, "If-Match")) != NULL) {
        if (if_match[0] == '*'
                || ((etag = apr_table_get(headers, "ETag")) == NULL
                        && !ap_find_etag_strong(r->pool, if_match, etag))) {
                || ((etag = apr_table_get(headers, "ETag")) != NULL
                        && ap_find_etag_strong(r->pool, if_match, etag))) {
            return AP_CONDITION_STRONG;
        }
        else {
@@ -552,9 +552,6 @@ AP_DECLARE(int) ap_meets_conditions(request_rec *r)
     */
    cond = ap_condition_if_match(r, r->headers_out);
    if (AP_CONDITION_NOMATCH == cond) {
        not_modified = 0;
    }
    else if (cond >= AP_CONDITION_WEAK) {
        return HTTP_PRECONDITION_FAILED;
    }