http://nagoya.apache.org/bugzilla/show_bug.cgi?id=202 *** shadow/202 Fri Mar 9 14:34:37 2001 --- shadow/202.tmp.7617 Fri Mar 9 14:34:37 2001 *************** *** 0 **** --- 1,69 ---- + +============================================================================+ + | If browser send russian locale (ru) then StaticInterceptor traps with a "n | + +----------------------------------------------------------------------------+ + | Bug #: 202 Product: Tomcat 3 | + | Status: UNCONFIRMED Version: 3.2.1 Final | + | Resolution: Platform: All | + | Severity: Normal OS/Version: All | + | Priority: High Component: Encoding | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | 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> <tt><a +href="/cocoonsamples">cocoonsamples/</a> </tt> + + </td><td><tt> </tt></td><td align=right><tt>??, 21 ??? 2000 00:39 +GMT+04:00</tt></td></tr> <tr><td colspan=3 +bgcolor=#ffffff> </td></tr> <tr><td colspan=4 +bgcolor=#cccccc><font +size=+2><strong>Files:</strong></font></td></tr><tr><td> + <tt><a +href="/m.html">m.html</a> </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> </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... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]