1. opensymphony
  2. webwork

Commits

plightbo  committed 6e1a65a

WW-633 possible fix

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@528573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 7b724e0
  • Branches master

Comments (0)

Files changed (1)

File src/java/com/opensymphony/webwork/dispatcher/multipart/JakartaMultiPartRequest.java

View file
  • Ignore whitespace
                         values = new ArrayList();
                     }
 
-                    values.add(item.getString(servletRequest.getCharacterEncoding()));
+                    // note: see http://jira.opensymphony.com/browse/WW-633
+                    // basically, in some cases the charset may be null, so
+                    // we're just going to try to "other" method (no idea if this
+                    // will work)
+                    String charset = servletRequest.getCharacterEncoding();
+                    if (charset != null) {
+                        values.add(item.getString(charset));
+                    } else {
+                        values.add(item.getString());
+                    }
                     params.put(item.getFieldName(), values);
                 } else if (item.getSize() == 0) {
                     log.debug("Item is a file upload of 0 size, ignoring");