You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jason Hunter <jh...@acm.org> on 2001/05/03 02:46:07 UTC
Bug in HttpDate.parse()
On my site I use Tomcat 3.2.1 with Apache 1.3.14 and mod_jk ajp12.
Someone reported the following problem.
>> I clicked on "Servlet ISPs" on Servlets.com and was redirected to
>>http://www.servlets.com/isps/servlet/ISPViewAll which threw the
>>following exception. Hope it helps...
>>
>> Error: 500
>>
>>*Internal Servlet Error:*
>>
>>java.lang.StringIndexOutOfBoundsException: String index out of range: 29
>> at java.lang.String.charAt(String.java:398)
>> at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1009)
>> at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:751)
>> at java.text.DateFormat.parse(DateFormat.java:306)
>> at org.apache.tomcat.util.HttpDate.parse(HttpDate.java:149)
>> at org.apache.tomcat.util.MessageString.toDate(MessageString.java:186)
>> at org.apache.tomcat.util.MimeHeaderField.getDateValue(MimeHeaderField.java:267)
>> at org.apache.tomcat.util.MimeHeaders.getDateHeader(MimeHeaders.java:304)
>> at org.apache.tomcat.core.Request.getDateHeader(Request.java:512)
>> at org.apache.tomcat.core.HttpServletRequestFacade.getDateHeader(HttpServletRequestFacade.java:146)
>> at com.oreilly.servlet.CacheHttpServlet.service(CacheHttpServlet.java:80)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>> at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:626)
>> at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:534)
>> at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
>> at org.apache.tomcat.core.InvokerServlet.service(InvokerServlet.java:239)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>> at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:626)
>> at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:534)
>> at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
>> at org.apache.tomcat.core.Context.handleRequest(Context.java:644)
>> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:440)
>> at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:144)
>> at org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:304)
>> at java.lang.Thread.run(Thread.java:474)
>>
I asked about it:
>Someone else found this once, and I seem to recall it was an issue with
>the browser sending a strange date. What browser are you using? Does
>it happen still on every access?
>
>-jh-
And they answered:
> Well, I admit I'm regularly playing around with different browsers,
> among which Mozilla, so that can be an explanation.
> And you made a second point : I can't reproduce the problem now,
> though I had tested several times before sending you the mail. This
> time, I've got the page right under NS4, Moz0.8.1 and even Moz nightly
> on the 0.9 branch...
> So it's up to you to decide if it's worth tracking down the problem :-)
>
> Oh, and by the way, thanks for that useful ISP info website :-)
Has anyone else seen this issue?
-jh-