commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mart...@apache.org
Subject svn commit: r349329 - /jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/FileUploadBase.java
Date Sun, 27 Nov 2005 23:18:31 GMT
Author: martinc
Date: Sun Nov 27 15:18:27 2005
New Revision: 349329

URL: http://svn.apache.org/viewcvs?rev=349329&view=rev
Log:
Bugzilla #34483 - If an explicit header encoding is not specified, use the one from the appropriate
context (i.e. ServletRequest or ActionRequest).

Modified:
    jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/FileUploadBase.java

Modified: jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/FileUploadBase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/FileUploadBase.java?rev=349329&r1=349328&r2=349329&view=diff
==============================================================================
--- jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/FileUploadBase.java
(original)
+++ jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/FileUploadBase.java
Sun Nov 27 15:18:27 2005
@@ -310,6 +310,11 @@
                 + "its size exceeds allowed range");
         }
 
+        String charEncoding = headerEncoding;
+        if (charEncoding == null) {
+            charEncoding = ctx.getCharacterEncoding();
+        }
+
         try {
             byte[] boundary = getBoundary(contentType);
             if (boundary == null) {
@@ -321,7 +326,7 @@
             InputStream input = ctx.getInputStream();
 
             MultipartStream multi = new MultipartStream(input, boundary);
-            multi.setHeaderEncoding(headerEncoding);
+            multi.setHeaderEncoding(charEncoding);
 
             boolean nextPart = multi.skipPreamble();
             while (nextPart) {



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


Mime
View raw message