Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-8249

JSP response only returns http header if response value includes surrogate character

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Out of Date
    • Affects Version/s: EAP_EWP 5.1.0, EAP_EWP 5.1.1, EAP_EWP 5.1.2
    • Fix Version/s: TBD EAP 5
    • Component/s: Web
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. Start EAP4.3 server.
      2. Deploy test.war.
      3. Execute following URL.
        http://localhost:8080/test/index.jsp
      4. You can confirm following JSP response.
        test
        ?
        
      1. Start EAP5.1 server.
      2. Deploy test.war.
      3. Execute following URL.
        http://localhost:8080/test/index.jsp
      4. You cannot confirm JSP response.
      Show
      Start EAP4.3 server. Deploy test.war. Execute following URL. http://localhost:8080/test/index.jsp You can confirm following JSP response. test ? Start EAP5.1 server. Deploy test.war. Execute following URL. http://localhost:8080/test/index.jsp You cannot confirm JSP response.
    • Release Notes Docs Status:
      Not Required
    • Docs QE Status:
      NEW

      Description

      If JSP response includes surrogate character (D800-E000), only http header returns to browser.
      This issue does not occur in EAP4.3. In EAP4.3, the surrogate character is converted into '?' and outputted.
      In EAP5.x, if JSP response includes surrogate character, result of java.nio.charset.CharsetEncoder.encode ([1] line 91) is not converted correctly and throw IOException([1] line 93). But, we cannot confirm reason of issue because the stack trace of IOException does not output ([2] line 351).

      [1] http://anonsvn.jboss.org/repos/jbossweb/tags/JBOSSWEB_2_1_10_GA/java/org/apache/tomcat/util/buf/C2BConverter.java

      org.apache.tomcat.util.buf.C2BConverter.java
      70 :    public void convert(CharChunk cc, ByteChunk bc) 
      71 :    throws IOException {
      ...
      91 :        CoderResult result = encoder.encode(cb, bb, false);
      92 :        if (result.isError() || result.isMalformed()) {
      93 :            result.throwException();
      94 :        } else if (result.isOverflow()) {
      

      [2] http://anonsvn.jboss.org/repos/jbossweb/tags/JBOSSWEB_2_1_10_GA/java/org/apache/catalina/connector/CoyoteAdapter.java

      org.apache.catalina.connector.CoyoteAdapter.java
      288 :    public void service(org.apache.coyote.Request req, 
      289 :    	                org.apache.coyote.Response res)
      290 :        throws Exception {
      ....
      345 :            if (!comet) {
      346 :                response.finishResponse();
      347 :                req.action(ActionCode.ACTION_POST_REQUEST , null);
      348 :            }
      349 :
      350 :        } catch (IOException e) {
      351 :            ;
      352 :        }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rmaucher Remy Maucherat
                Reporter:
                enagai Eiichi Nagai
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: