Hello,

i have found an error in the method createLocalFile of MultipartIterator.
If the uploaded file contains a \r\n\n sequence there will be a wrong carriage added.

The sequence \r\n\n will change to \r\n\r\n.

The cutCarriage flag will be remembered from the last read if 
readBytes will be 0.

The following diff contains the fix

Index: MultipartIterator.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-struts/src/share/org/apache/struts/upload/MultipartIterator.java,v
retrieving revision 1.13
diff -r1.13 MultipartIterator.java
499a500
>                                                                                      
>         cutCarriage = false;
504,506d504
<                             }
<                             else {
<                                 cutCarriage = false;



Markus Pallo

Sorry for the wrong indention of the diff, i won't change my emacs settings.......

Reply via email to