On 03/03/2025 10:03, Rémy Maucherat wrote:
On Mon, Mar 3, 2025 at 10:30 AM Mark Thomas <ma...@apache.org> wrote:
On 28/02/2025 22:41, r...@apache.org wrote:

<snip/>

               // If the ETag the client gave does not match the entity
               // etag, then the entire entity is returned.
-            if (resourceETag != null && resourceETag.startsWith("\"") && 
resourceETag.equals(headerValue.trim())) {
+            if (resourceETag != null && resourceETag.equals(headerValue)) {

This doesn't look right. Weak entity tags should never match for a
request using If-Range. I think you need "... && !weakETag" in the above
condition as well.

Given the report in BZ and my reading of the specification, I missed
it. Should I revert it ?

I don't think so. The bug is valid (to a point). A weak etag probably shouldn't trigger a 400 response and the patch fixes that.

Just returning false from checkIfRange() for a weak entity tag looks to be sufficient.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to