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 51346] New: When RequestDumperValve is enabled, an attempt to read from InputStream from an application is failing
Date Thu, 09 Jun 2011 07:54:08 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51346

             Bug #: 51346
           Summary: When RequestDumperValve is enabled, an attempt to read
                    from InputStream from an application is failing
           Product: Tomcat 6
           Version: 6.0.32
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: violetagg@apache.org
    Classification: Unclassified


Created attachment 27136
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27136
test-input-stream web application

Hello,

I have an application that tries to get InputStream and to read from it.
Without RequestDumperValve everything is OK.
When I enable RequestDumperValve it appears that the InputStream is already
read and the end of stream is reached.

How to reproduce:
1.Deploy the attached test-input-stream.war.
2.Use the attached TestClient that will send a POST request.
3.In the console you will see "in.read() != -1" which is OK
4.Enable the RequestDumperValve in the server.xml
5.Use again the attached TestClient that will send a POST request.
6.In the console you will see "in.read() == -1" which is true when the end of
stream is reached.

What TestClient does:
- sends POST request via HttpURLConnection
- writes to the OutputStream

My suspicious is that RequestDumperValve wants to dump the parameters, but
parsing the parameters operation will read InputStream.

Can you give me advice how to proceed.

Thanks in advance.
Regards
Violeta

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message