https://bz.apache.org/bugzilla/show_bug.cgi?id=69957

            Bug ID: 69957
           Summary: ETag header is missing closing quote when requesting
                    conneg resource without extension
           Product: Apache httpd-2
           Version: 2.4.66
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_negotiation
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Hi, we have this issue with a plain vanilla Apache on Debian Trixie:

To reproduce: add any file to your document tree. In my test I added a simple 
bare text file, test.txt.

When requesting the file with the extension, the ETag header is correct:

$ curl -Ik http://localhost/test.txt
HTTP/1.1 200 OK
Date: Thu, 19 Feb 2026 11:01:15 GMT
Server: Apache/2.4.66 (Debian)
Last-Modified: Thu, 19 Feb 2026 09:44:52 GMT
ETag: "14-64b2a2803a3cf"
Accept-Ranges: bytes
Content-Length: 20
Content-Type: text/plain

However, if I omit the extension, the generated ETag header is missing its
closing quote:

$ curl -Ik http://localhost/test
HTTP/1.1 200 OK
Date: Thu, 19 Feb 2026 11:00:56 GMT
Server: Apache/2.4.66 (Debian)
Content-Location: test.txt
Vary: negotiate,accept
TCN: choice
Last-Modified: Thu, 19 Feb 2026 09:44:52 GMT
ETag: "14-64b2a2803a3cf;64b2a2803d2af
Accept-Ranges: bytes
Content-Length: 20
Content-Type: text/plain

>From what I see in mod_negotiation, in the latter case, the ETag value is
constructed little by little using r->vlist_validator 
and calling http_etag:make_etag(). This function calls in turn 
http_etag_etag_end(), where the header value is left open (no closing quote)
when using a vlist. 

Once mod_negotiation finishes processing all the variations for the resource I
think it's missing a call to http_etag:etag_end() 
with a NULL vlv argument so it can close the tag.

-- 
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