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 18804] New: - XML query truncated (AJP13 connector guilty ?)
Date Tue, 08 Apr 2003 09:34:40 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=18804>.
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=18804

XML query truncated (AJP13 connector guilty ?)

           Summary: XML query truncated (AJP13 connector guilty ?)
           Product: Tomcat 4
           Version: 4.1.24
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Connector:JK/AJP (deprecated)
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jcouillaud@net2s.com


This is an odd bug (in tomcat's code or in the webapp code) from a code I do not
maintain and hardly can modify.

There is an applet that tries to communicate with a web application by sending
the servlet an XML query the following way:

            url = new URL(urlString);
            conn = url.openConnection();
            conn.setDoInput(true);
            conn.setDoOutput(true);
            conn.setRequestProperty("APPLETENCODING", encoding);
            conn.setRequestProperty("APPLETXMLENCODING", xmlEncoding);
            conn.setRequestProperty("APPLETCHARSET", charset);
            BufferedWriter bw = new BufferedWriter(new
OutputStreamWriter(conn.getOutputStream(), encoding));
            bw.write(appRequest.toString()); // appRequest contains the XML query
            bw.flush();
            bw.close();


Then, in the servlet called via the urlString argument above, the application
tries to get the argument and use it the following way:

        encoding = request.getHeader("PORTALAPPLETENCODING");
        xmlEncoding = request.getHeader("PORTALAPPLETXMLENCODING");
        charset = request.getHeader("PORTALAPPLETCHARSET");

        in = request.getInputStream();
        reader = new InputStreamReader(in, encoding);
        br = new BufferedReader(reader);

The appRequest sent in the applet is a raw XML string
(<something><asd></asd></something>)

The problem is the following:
- On tomcat 3.3a with mod_jk, the XML string arrives properly and the servlet
handles it properly.
- On tomcat 4.1.24 without mod_jk, the XML string arrives properly too ...
- On tomcat 4.1.24 with mod_jk, the XML string arrives truncated !

The only conclusion I've come is the following:
- There is a bug in the ajp13 connector in tomcat 4.1.x
OR
- The way this webapp sends this XML string to the servlet is invalid and the
fact that it worked with the ajp13 connector of tomcat 3.3a wasn't a
functionnality at all and that the developper was just lucky it worked.

We badly need to get it working, either by downgrading to tomcat 3.3a or by
getting tomcat 4.1.x patched.

Thx in advance.

---------------------------------------------------------------------
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