[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087 Konstantin Kolinko knst.koli...@gmail.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Konstantin Kolinko knst.koli...@gmail.com --- Fixed in Tomcat 6 with r1417903 , will be in 6.0.37 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087 Konstantin Kolinko knst.koli...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID |--- --- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com --- (In reply to comment #1) When processing the If-Modified-Since header in the DefaultServlet, Tomcat does follow RFC2616-14.25.a and effectively ignores the header. I am REOPENing this. The DefaultServlet is OK and has the necessary try/catches around getDateHeader() calls. The problem is in javax.servlet.http.HttpServlet#service() where a try/catch is missing. I see two options: a) ignore the invalid header, like it is done by DefaultServlet, b) silently fail with error 400. Failing with error 500 isn't good. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087 --- Comment #3 from Mark Thomas ma...@apache.org --- Thanks for catching that. I should have read the stack trace more carefully. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087 --- Comment #4 from Mark Thomas ma...@apache.org --- Fixed in trunk and 7.0.x and will be included in 7.0.33 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087 --- Comment #5 from Konstantin Kolinko knst.koli...@gmail.com --- I proposed the patch (r1408254) for Tomcat 6. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54087] HTTP Connector incorrectly throws Exception on Invalid If-Modified-Since Header
https://issues.apache.org/bugzilla/show_bug.cgi?id=54087 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Mark Thomas ma...@apache.org --- There is a grey(ish) area here. SRV.3.4 states If the getDateHeader method cannot translate the header to a Date object, an IllegalArgumentException is thrown RFC2616-3.3.1 states Recipients of date values are encouraged to be robust in accepting date values. I take 'robust' in this case to mean tolerant rather than strict. It could be read as either. RFC2616-14.25.a as already quoted Together, these suggest that Tomcat should try and parse the header regardless of the format and if it can't parse it ignore it if the header is an If-Modified-Since header. When processing the If-Modified-Since header in the DefaultServlet, Tomcat does follow RFC2616-14.25.a and effectively ignores the header. The Javadoc for getDateHeader() states that returns ... -1 if the named header was not included with the request. That is the only circumstance in which -1 is a permitted return value so if the header is present but in the wrong format Tomcat's only options are a) throw an IAE, b) parse it anyway. The problem with b) is that Tomcat would have to guess what the invalid format was. That is easier said than done. Therefore, all Tomcat can realistically do here is throw IAE. That, therefore, passes responsibility for adhering to RFC2616-14.25.a to whatever code is calling getDateHeader(). In this case the application; making it an application issue not a Tomcat one. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org