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/03/20 20:46:59 UTC

DO NOT REPLY [Bug 18201] New: - Tomcat 5 regression: getReader() doesnot throw UnsupportedEncodingException when bogus charset is used

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=18201>.
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=18201

Tomcat 5 regression: getReader() doesnot throw UnsupportedEncodingException when bogus charset is used

           Summary: Tomcat 5 regression: getReader() doesnot throw
                    UnsupportedEncodingException when bogus charset is used
           Product: Tomcat 5
           Version: 5.0.1
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: dianne.jiao@sun.com
                CC: Ryan.Lubke@Sun.COM,jfarcand@apache.org


Request:
[REQUEST LINE] -> POST
/servlet_js_servletrequest_web/getReaderUnsupportedEncodingExceptionTest
HTTP/1.1
     [java]        [REQUEST HEADER] -> Content-Length: 49
     [java]        [REQUEST HEADER] -> Host: slappy.east:8080
     [java]        [REQUEST HEADER] -> User-Agent: Jakarta
Commons-HttpClient/2.0M1
     [java]        [REQUEST HEADER] -> Content-Type: text/plain;
charset=DoesNonExist
     [java]        [REQUEST BODY LENGTH] -> 49

Servlet code:
public void service(ServletRequest request, ServletResponse response) throws
ServletException, IOException {
        PrintWriter pw=response.getWriter();
        try {
            BufferedReader br = request.getReader();
            pw.println( "getReader() method did not throw
UnsupportedEncodingException" );
        } catch (Throwable t) {
            if ( !(t instanceof UnsupportedEncodingException) ) {
                pw.println("Exception thrown, but was not an instance of
IllegalStateException.");
                pw.println("instead received: " + t.getClass().getName());
            }
        }
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org