arturobernalg commented on PR #1054: URL: https://github.com/apache/tomcat/pull/1054#issuecomment-6719220707
Thanks for working on this. I tried it on a real Tomcat, current main against this branch (merged by hand, because it now conflicts with main), and I think two things need another look. The shared parser is also used by the DefaultServlet, so conditional requests change. `If-Modified-Since: @4102444800` now gets a 304 and `If-Unmodified-Since: @0` gets a 412, while main ignores both and answers 200. RFC 9110 says a recipient MUST ignore these headers when the value is not a valid HTTP-date. Maybe the `@` form should stay out of `parseDate()` and only be handled where the header is known to be a structured field date. The value is multiplied by 1000 without a check, so `@9223372036854775807` makes `getDateHeader()` return -1000 instead of throwing. RFC 9651 limits an integer to 15 digits, so longer values (and `@+5`) should be rejected. The branch also conflicts with #1104 (the rfc850 two-digit year change), so a rebase has to keep that code. -- 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]
