Bug report #311 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com:8888/BugRatViewer/ShowReport/311>

REPORT #311 Details.

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: non-critical
Confidence: public
Environment: 
   Release: 3.2 betta 6
   JVM Release: IBM Java2 v1.3.0
   Operating System: Linux RH
   OS Release: 6.2
   Platform: Intel

Synopsis: 
If browser send russian locale (ru) then StaticInterceptor traps with a "non 
ISO-8859-1" charset exception at attempt to write buf to ServletOutputStream, the date 
gets cyricllic characters

Description:
in src/share/org/apache/tomcat/request/StaticInterceptor.java, line apporx 354, we've 
got

    public void doService(Request req, Response res)
        throws Exception
    {
        // this is how ge...
        // the next round of optimizations
        Locale locale=RequestUtil.getLocale(req);
        StringManager 
sm=StringManager.getManager("org.apache.tomcat.resources",locale);
        DateFormat dateFormat =
            new SimpleDateFormat(datePattern,locale );
            ...
and later, at line around 488 (at the end of doService()) we've got
                ...
                buf.append("<td align=right><tt>");
                buf.append(dateFormat.format(new Date(f.lastModified())));
                ...
which resulted in the following exception 

java.io.IOException: Not an ISO 8859_1 character:?
        at java.lang.Throwable.(Throwable.java:96)
        at java.lang.Exception.(Exception.java:44)
        at java.io.IOException.(IOException.java:49)
        at 
org.apache.tomcat.core.BufferedServletOutputStream.print(BufferedServletOutputStream.java(Compiled
 Code))
        at org.apache.tomcat.request.DirHandler.doService(StaticInterceptor.java:538)
        at org.apache.tomcat.core.Handler.service(Handler.java:263)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
        at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:786)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:732)
        at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:498)

when the request contains russina locale
(don't pay too much attention to line numbers I've got 'em a little bit wrong cause to 
my modifications .. ;) 


In short that is the line 
             ServletOutputStream out=res.getOutputStream();
              out.print(buf.toString());


I've also dumped the buf to a file (just for my pleasure), here it is:
=============================================
java.io.IOException: Not an ISO 8859_1 character:?                                     
                                                                                
<html>                                                      
<head>                                                      <title>Directory Listing 
for:/</title>                                               </head><body 
bgcolor=white>                                              <table width=90% 
cellspacing=0 cellpadding=5 align=center><tr><td colspan=3><font 
size=+2><strong>Directory Listing for:/</strong></td></tr>                           
<tr><td colspan=3 bgcolor=#cccccc><font size=+2><strong>Subdirectories:</strong>       
             </font></td></tr>                                           
<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tt><a 
href="/cocoonsamples">cocoonsamples/</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt>      
                             
</td><td><tt>&nbsp;&nbsp;</tt></td><td align=right><tt>??, 21 ??? 2000 00:39 
GMT+04:00</tt></td></tr>                                    <tr><td colspan=3 
bgcolor=#ffffff>&nbsp;</td></tr>                            <tr><td colspan=4 
bgcolor=#cccccc><font 
size=+2><strong>Files:</strong></font></td></tr><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <tt><a 
href="/m.html">m.html</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td>                
                                 <td align=right><tt>0.0 KB</tt></td><td 
align=right><tt>??, 23 ??? 2000 15:04 GMT+04:00</tt></td></tr>                         
           <tr><td colspan=3 bgcolor=#ffffff>&nbsp;</td></tr><tr><td colspan=3 
bgcolor=#cccccc><font size=-1>Tomcat Web Server v3.2 beta 6
</font></td></tr></table></body></html> 

Here we can see that some parts of the date got wrong...

Title: BugRat Report # 311
Directory Listing for:/
Subdirectories:
      cocoonsamples/         ??, 21 ??? 2000 00:39 GMT+04:00
 
Files:
       m.html       0.0 KB??, 23 ??? 2000 15:04 GMT+04:00
 
Tomcat Web Server v3.2 beta 6
Here we can see that some parts of the date got wrong...

How To Reproduce:
null

Workaround:
null

View this report online...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to