DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32795>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32795

           Summary: If RequestDumperValve is enabled, the request parameter
                    value parsed by default character encoding is always
                    returned.
           Product: Tomcat 5
           Version: 5.0.30
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


In Tomcat container that enabled the RequestDumperValve valve, 
request.setCharacterEncoding 
method doesn't affect the behavior of request.getParameter method, so servlet 
or jsp 
cannot correctly get any multi-byte characters contained in the request 
parameter.
On the other hand, if the RequestDumperValve valve is disabled, the request 
parameter that contains multi-byte characters is done correctly.

This issue occurs in both GET and POST requests, and also Tomcat 4.1.31 
release.

Root cause:
It seems that the logging processes of the request infomations are worked in 
RequestDumperValve, before calling servlet, jsp, and filter.
In that case, naturally, the request character encoding contained in them is 
null value and RequestDumperValve prints out it, and it also prints out an 
information about request parameters.
Then, any request parameters are initially parsed by default encoding 
(=8859_1), 
because character encoding of request is null.

In CoyoteRequest, when the method to get request parameter is called, parsing 
of 
request parameters is processed for only one time.
After this initial parsing of request parameters, the setter method of request 
character encoding doesn't affect the behavior of getter methods of request 
parameter at all.

For that reason, even if the setter method of request character encoding is 
often 
invoked in servlet or jsp, or filter, the request parameter value that was 
initially parsed by default encoding is always returned.

Workaround:
Customize and substitute the filter class equivalent to the RequestDumperValve 
valve.
RequestDumperFilter class contained in examples application is a good guide.


Regards,
Kan Ogawa

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to