You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2005/01/08 16:57:50 UTC

DO NOT REPLY [Bug 33013] New: - Cocoon incorrectly handles form encoding when form is passed as "multipart/form-data"

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=33013>.
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=33013

           Summary: Cocoon incorrectly handles form encoding when form is
                    passed as "multipart/form-data"
           Product: Cocoon 2
           Version: Current SVN 2.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: core
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: bzak@mediaambassador.com


Cocoon incorrectly handles form encoding when form is passed as
"multipart/form-data" and the encoding is configured with parameters in web.xml 
eg.
		 <init-param>
				<param-name>container-encoding</param-name>
				<param-value>ISO-8859-1</param-value>
		 </init-param>	   
		 <init-param>
				 <param-name>form-encoding</param-name>
				 <param-value>utf-8</param-value>
		 </init-param>


things work fine with normal url-encoded forms but when multipart form is
submitter encoding isn't handled properly. 

this bug can be easily fixed by replacing 
        this.requestFactory = new RequestFactory(this.autoSaveUploads,
                                                 this.uploadDir,
                                                 this.allowOverwrite,
                                                 this.silentlyRename,
                                                 this.maxUploadSize,
                                                 this.defaultFormEncoding);

with 
        this.requestFactory = new RequestFactory(this.autoSaveUploads,
                                                 this.uploadDir,
                                                 this.allowOverwrite,
                                                 this.silentlyRename,
                                                 this.maxUploadSize,
                                                 this.containerEncoding);

i.e.
this.defaultFormEncoding => this.containerEncoding

in CocoonServlet.java file line 473.

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