diff options
author | Jim Jagielski <jim@apache.org> | 2015-04-19 18:03:38 +0000 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2015-04-19 18:03:38 +0000 |
commit | 46265428719f1e5f8a941a73cdb48ca6d72cd049 (patch) | |
tree | 35fddf9d6e520e4c8cbf4c96d298eb3ba3ae01f7 /modules/http/http_protocol.c | |
parent | 1558acea1409cd0817cef29e0162f3bbbb5a1341 (diff) | |
download | httpd-46265428719f1e5f8a941a73cdb48ca6d72cd049.tar.gz |
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
Diffstat (limited to 'modules/http/http_protocol.c')
-rw-r--r-- | modules/http/http_protocol.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index a7f30fcf98..fc7ec6ccbe 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -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; } |