DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13701>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13701

newline swallowed bei MultipartElement or MultipartIterator

           Summary: newline swallowed bei MultipartElement or
                    MultipartIterator
           Product: Struts
           Version: 1.0.2 Final
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: File Upload
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I use tomcat 4.1.12 and struts 1.0.2 stable on a Pentium I/RedHat Linux.
My sourcecode looks like this:

public void doPost(HttpServletRequest request, HttpServletResponse response) {
   MultipartIterator iterator = new MultipartIterator(request, 4096, 200000);
   while ((element = iterator.getNextElement()) != null) {
      if (element.getName().equals("foo")) {
          this.foo = element.getValue();
          ...

When I make a html-post "multipart/form-data" from a html-form with a textarea-
element that has more than one line, element.getValue() swallows the first 
newline(only the first). When I make a tcpdump or when I use the InputStreams, 
I see the newline.

I think, itīs a bug in MultipartElement or in MultipartIterator.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to