[ http://issues.apache.org/struts/browse/STR-1845?page=all ]
David Evans closed STR-1845:
----------------------------
Resolution: Fixed
> File name is not decoded properly when character encoding is different than
> on application server
> -------------------------------------------------------------------------------------------------
>
> Key: STR-1845
> URL: http://issues.apache.org/struts/browse/STR-1845
> Project: Struts Action 1
> Type: Bug
> Components: Action
> Versions: 1.1 Final
> Environment: Operating System: All
> Platform: All
> Reporter: Srdjan Pantic
> Assignee: David Evans
>
> If encoding in your browser is different than encoding on your application
> server file name will be decoded incorect.
> For example, if you are using UTF-8 as encoding in your application your
> browser will encode all form fields values as UTF-8. And if you set a UTF-8
> in request as request.setCharacterEncoding("UFT-8"), using a filter, Struts
> will handle everything correctly except for the file upload.
> Class org.apache.struts.upload.CommonsMultipartRequestHandler will not use
> character encoding from request (if it is available) for file, event if it
> use
> it for multipart text values (see method addTextParameter(HttpServletRequest
> request, FileItem item)).
> Solution for this problem, unless I'm missing something (which can be true
> also) is to change a method handleRequest(HttpServletRequest request):
> if (request.getCharacterEncoding() != null ) {
> upload.setHeaderEncoding(request.getCharacterEncoding());
> }
> Of course provided character encoding must be supported, but this is idea.
> The problem is browser will encode a file correctly but even if using the
> filter you set proper
> request encoding to UTF-8 Struts will not use it, not for the file name. So
> you was right.
> If I changed CommonsMultipartRequestHandler to use
> request.getCharacterEncoding () that will work
> as should, but not in any other case.
> Am I missing something? Did you find something else after your last post?
> Thank you!
> Kind regards,
> Srdjan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]