arturobernalg opened a new pull request, #1150:
URL: https://github.com/apache/tomcat/pull/1150

   RFC 9110, section 5.6.1.2: "a recipient MUST accept lists that satisfy the 
following syntax: #element => [ element ] *( OWS "," OWS [ element ] )". 
`If-Match` and `If-None-Match` are lists of entity-tags, but 
`EntityTag.compareEntityTag()` rejected a list with an empty element, so 
`If-None-Match: ,W/"x"`, `If-None-Match: W/"x",` and `If-None-Match: 
"a",,W/"x"` all produced a 400 response. On a running server the same request 
without the empty element produced the expected 304.
   
   The empty elements are now skipped. A list that contains no entity-tag at 
all (for example an empty value or a lone comma) is still invalid, as before.
   
   I checked the other list based request headers that Tomcat interprets 
(`Accept-Language`, `Accept-Encoding`, `Connection` and `Transfer-Encoding`) 
with leading, trailing and doubled commas. They already behave as with a clean 
value, so this was the one that did not.
   
   The new `TestEntityTag.testEmptyListElements` fails without the change 
(`"a",, "b" expected:<true> but was:<null>`). 
`TestDefaultServletRfc9110Section13` (1210 tests) and `TestDefaultServlet` 
still pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to