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 2010/09/22 20:19:06 UTC
DO NOT REPLY [Bug 49979] New: SimpleDateFormat
StringIndexOutOfBoundsException
https://issues.apache.org/bugzilla/show_bug.cgi?id=49979
Summary: SimpleDateFormat StringIndexOutOfBoundsException
Product: Tomcat 6
Version: 6.0.20
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: sosigene@gmail.com
thread dump here:
---------------------
http-8080-1@2990 daemon, prio=5, in group 'main', status: 'runnable'
java.lang.Thread.State: RUNNABLE
at java.lang.String.charAt(String.java:686)
at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1778)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1312)
at java.text.DateFormat.parse(DateFormat.java:335)
at
org.apache.tomcat.util.http.FastHttpDateFormat.internalParseDate(FastHttpDateFormat.java:191)
at
org.apache.tomcat.util.http.FastHttpDateFormat.parseDate(FastHttpDateFormat.java:166)
at org.apache.catalina.connector.Request.getDateHeader(Request.java:1837)
at
org.apache.catalina.connector.RequestFacade.getDateHeader(RequestFacade.java:632)
at
org.apache.catalina.servlets.DefaultServlet.checkIfModifiedSince(DefaultServlet.java:1604)
at
org.apache.catalina.servlets.DefaultServlet.checkIfHeaders(DefaultServlet.java:615)
at
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:723)
at
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:332)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
------------------------
The date variable it attempts to parse above is:
"Wed, 21 Apr 2010 21:20:26 GMT"
OS: CentOS5
Tomcat ver.: 6.0.20
requests are coming from
Windows XP/IE6 SP3
the same can be reproduced with requests from Vista/Firefox 3.6.9. Will add
other environments/details as I test this on various Windows stations/locale as
cannot reproduce in linux.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49979] SimpleDateFormat
StringIndexOutOfBoundsException
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49979
--- Comment #2 from sosigene@gmail.com 2010-09-23 14:13:22 EDT ---
(In reply to comment #1)
> > OS: CentOS5
> > Tomcat ver.: 6.0.20
> > requests are coming from
> > Windows XP/IE6 SP3
>
> Which JVM version are you using?
sun jdk1.6.0_16
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49979] SimpleDateFormat
StringIndexOutOfBoundsException
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49979
sosigene@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
Severity|major |minor
--- Comment #3 from sosigene@gmail.com 2010-09-27 09:32:07 EDT ---
closing issue as it is really about the jdk 1.6.0_16 implementation, see
SimpleDateFormat lines 1767-1785
// For time zones that have no known names, look for strings
// of the form:
// GMT[+-]hours:minutes or
// GMT.
if ((text.length() - start) >= GMT.length() &&
text.regionMatches(true, start, GMT, 0, GMT.length())) {
int num;
calendar.set(Calendar.DST_OFFSET, 0);
pos.index = start + GMT.length();
try { // try-catch for "GMT" only time zone string
char c = text.charAt(pos.index);
if (c == '+') {
sign = 1;
} else if (c == '-') {
sign = -1;
}
}
catch(StringIndexOutOfBoundsException e) {}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49979] SimpleDateFormat
StringIndexOutOfBoundsException
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49979
--- Comment #1 from Pid <pi...@apache.org> 2010-09-23 06:14:03 EDT ---
> OS: CentOS5
> Tomcat ver.: 6.0.20
> requests are coming from
> Windows XP/IE6 SP3
Which JVM version are you using?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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