https://issues.apache.org/bugzilla/show_bug.cgi?id=57358

            Bug ID: 57358
           Summary: Incorrect If-Match handling
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: [email protected]
          Reporter: [email protected]

Handling of If-Match header (RFC 2616, Section 14.24) seems to be broken. See
an example session below:


# Obtain ETag

GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Tue, 16 Dec 2014 02:27:48 GMT
Server: Apache/2.4.10 (Unix)
Last-Modified: Mon, 11 Jun 2007 18:53:14 GMT
ETag: "2d-432a5e4a73a80"
Accept-Ranges: bytes
Content-Length: 45
Connection: close
Content-Type: text/html

<html><body><h1>It works!</h1></body></html>


# If-Match with ETag => OK

GET / HTTP/1.0
If-Match: "2d-432a5e4a73a80"

HTTP/1.1 200 OK
Date: Tue, 16 Dec 2014 02:28:33 GMT
Server: Apache/2.4.10 (Unix)
Last-Modified: Mon, 11 Jun 2007 18:53:14 GMT
ETag: "2d-432a5e4a73a80"
Accept-Ranges: bytes
Content-Length: 45
Connection: close
Content-Type: text/html

<html><body><h1>It works!</h1></body></html>


# If-Match: * => WRONG, should return 200

GET / HTTP/1.0
If-Match: *

HTTP/1.1 412 Precondition Failed
Date: Tue, 16 Dec 2014 02:28:43 GMT
Server: Apache/2.4.10 (Unix)
Last-Modified: Mon, 11 Jun 2007 18:53:14 GMT
ETag: "2d-432a5e4a73a80"
Accept-Ranges: bytes
Content-Length: 0
Connection: close
Content-Type: text/html


# ETag doesn't match => WRONG, should return 412

GET / HTTP/1.0
If-Match: "xyzzy"

HTTP/1.1 200 OK
Date: Tue, 16 Dec 2014 02:28:53 GMT
Server: Apache/2.4.10 (Unix)
Last-Modified: Mon, 11 Jun 2007 18:53:14 GMT
ETag: "2d-432a5e4a73a80"
Accept-Ranges: bytes
Content-Length: 45
Connection: close
Content-Type: text/html

<html><body><h1>It works!</h1></body></html>

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to