Hi developers,
there is a problem in nukes1.1RC3. Take a look at the contructor of 
org.jboss.nukes.servlet.MultipartRequest. The parameters values are extracted from 
upload fields with the standard encoding, ignoring the configured character set. In 
fact, the zero parameters version of org.apache.commons.fileupload.FileItem is called.

This is the code (with my comments in bold):

public MultipartRequest(HttpServletRequest request, int sizeMax)
         throws FileUploadException
   {
      super(request);

      // Create a new file upload handler
      DiskFileUpload upload = new DiskFileUpload();

      // Set upload parameters
      upload.setSizeMax(sizeMax);
      upload.setSizeThreshold(sizeMax);
      upload.setRepositoryPath(System.getProperty("java.io.tmpdir"));

      // Get request parameters
      for (Enumeration en = request.getParameterNames();en.hasMoreElements();)
      {
         String name = (String)en.nextElement();
         parameters.put(name, request.getParameterValues(name));
      }

      // Merge with upload fields
      for (Iterator i = upload.parseRequest(request).iterator();i.hasNext();)
      {
         FileItem item = (FileItem)i.next();
         if (item.isFormField())
         {
            // NEXT LINE IS PROBABLY WRONG
            parameters.put(item.getFieldName(), new String[]{item.getString()});
         }
         else
         {
            files.put(item.getFieldName(), new UploadedFile(item.getContentType(), 
item.get()));
         }
      }
   }
 
Thanks in advance,
Marco


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853893#3853893

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853893


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to