tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4036] - HttpServletRquest.getDateHeader(String header) implementaion not thread safe
Date Mon, 12 May 2003 11:48:58 GMT
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


Mime
View raw message