You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2026/02/19 11:19:13 UTC

[Bug 69957] New: ETag header is missing closing quote when requesting conneg resource without extension

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: bugs@httpd.apache.org
          Reporter: jose@w3.org
  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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 69957] ETag header is missing closing quote when requesting conneg resource without extension

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69957

Giovanni Bechis <gi...@paclan.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Giovanni Bechis <gi...@paclan.it> ---
This is now fixed in r1931953, thanks.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 69957] ETag header is missing closing quote when requesting conneg resource without extension

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69957

Giovanni Bechis <gi...@paclan.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org