You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2025/03/05 09:15:52 UTC
[Bug 69604] New: Catalina connector request does not adhere to RFC 7232 3.3 (If-Modified-Since)
https://bz.apache.org/bugzilla/show_bug.cgi?id=69604
Bug ID: 69604
Summary: Catalina connector request does not adhere to RFC 7232
3.3 (If-Modified-Since)
Product: Tomcat 10
Version: 10.1.34
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: morm@jfrog.com
Target Milestone: ------
RFC 7232 3.3 (If-Modified-Since) states:
"A recipient MUST ignore the If-Modified-Since header field if the
received field-value is not a valid HTTP-date, or if the request
method is neither GET nor HEAD."
Currently, org.apache.catalina.connector.Request#getDateHeader throws an
exception instead of ignoring:
@Override
public long getDateHeader(String name) {
String value = getHeader(name);
if (value == null) {
return -1L;
}
// Attempt to convert the date header in a variety of formats
long result = FastHttpDateFormat.parseDate(value);
if (result != (-1L)) {
return result;
}
throw new IllegalArgumentException(value);
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 69604] Catalina connector request does not adhere to RFC 7232 3.3 (If-Modified-Since)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69604
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Remy Maucherat <re...@apache.org> ---
It is normal that getDateHeader throws an exception, the signature and behavior
are defined in the Servlet specification.
DefaultServlet.checkIfModifiedSince catches that IllegalArgumentException and
should handle the If-Modified-Since header properly.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org