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 19521] New: - RequestDumperValve gets in the way of request.setCharacterEncoding
Date Thu, 01 May 2003 17:25:15 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=19521>.
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=19521

RequestDumperValve gets in the way of request.setCharacterEncoding

           Summary: RequestDumperValve gets in the way of
                    request.setCharacterEncoding
           Product: Tomcat 4
           Version: 4.1.18
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina:Modules
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: dclarke@rim.net


In order to set the character encoding for a particular request, 
Request.setCharacterEncoding must be called before any calls to the other 
Request methods are made.

When RequestDumperValve is active, it intercepts requests before they get to 
the servlet.  When it calls methods on the request object to gather up 
information for logging, it has the side affect of setting the character 
encoding to the platform default.

This may be considered as designed behavior, however it is not obvious that 
this is what is happening.  For developers writing Internationalized code, this 
can cause a lot of cycles to be wasted.

Some possible alternatives (probably more than just these):
* Have RequestDumperValve wait until after the Servlet has been invoked before 
gathering information for logging.
* Have Request.setCharacterEncoding throw an exception or log some highly 
visible information when it detects that the new encoding will have no affect.  
This log information should say something about RequestDumperValve so the user 
is pointed in the right direction for a fix.
* other better ideas???

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