tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 57485] New: mod_jk passed the incomplete chunked transferred request body to tomcat
Date Fri, 23 Jan 2015 05:15:43 GMT

            Bug ID: 57485
           Summary: mod_jk passed the incomplete chunked transferred
                    request body to tomcat
           Product: Tomcat Connectors
           Version: 1.2.40
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_jk

Created attachment 32392
packet capture

I'm using mod_jk to connect apache to tomcat,
When I send the following tcp packets(to simulate incomplete chunked body) and
close the socket,strangely my servlet did received the partial body as
complete,packet capture shows that mod_jk decoded the chunked body and passed
the incomplete body just as complete to tomcat.
Please see the packet capture file for details.

1.tcp packet I sent
POST /TestServlet/helloworld HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:
Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Transfer-Encoding: chunked


2.servlet code
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
        System.out.println("doPost start");
        Enumeration pem = req.getParameterNames();
        while (pem.hasMoreElements()) {
            String k = pem.nextElement().toString();
            String v = req.getParameter(k);
            System.out.println(k + "=" + v);
        System.out.println("doPost end");



3.the current result 
the servlet outputs the following
doPost start
doPost end

4.the result I expected
doPost start
doPost end


You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message