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 2003/05/12 13:48:58 UTC
DO NOT REPLY [Bug 4036] -
HttpServletRquest.getDateHeader(String header) implementaion not thread safe
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4036>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4036
HttpServletRquest.getDateHeader(String header) implementaion not thread safe
thomas.phlips@accenture.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
------- Additional Comments From thomas.phlips@accenture.com 2003-05-12 11:48 -------
Same problem occurs still in tomcat v3.3.1,v 1.2 (2002/03/01 01:32:06).
It occurs e.g. when accessing a static html page containing some relative image
links (depending on server config. etc, it occurs in almost 5% of the cases,
even without havy load, just refreshing the page with one user). Cause seems to
be the same:
The static method DateUtil.parseDate uses the
same SimpleDateFormat (e.g. the rfc1123Format static final attribute) for every
call. Unfortunatly Sun's implemention of a
SimpleDateFormat is not thread safe since it holds a DecimalFormat as a member
variable. The decimalFormat itself has other member variables holding state
information.
To be sure, I modified the DateUtil parseDate method to use local newly created
variables for the dateformats every time, ... and indeed the problem no longer
occurs then.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org