mansehajsingh commented on PR #1037:
URL: https://github.com/apache/polaris/pull/1037#issuecomment-2698550870

   I realized a bug I introduced with the parsing of the header, splitting by 
whitespace or commas is incorrect because these are not necessarily always 
delimiters as they can be contained within the value of an ETag. I have updated 
it to now use two RegExs, one to validate the format of the entire header to be 
HTTP compliant (eg. comma and space between each ETag, each ETag matches, no 
trailing comma) and then one to extract the captured ETags from the header. I 
have removed unnecessary capture groups from both of these.
   
   Previously, an invalid header like `W/"etag" W/"etag"` would have passed 
through, now the delimiter will be properly validated and parsed.
   
   I have also replaced the empty and wildcard ETags as constants.


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

Reply via email to