commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Closed: (FILEUPLOAD-139) [fileupload] separator of boundary doesnt match rfc1867 examples
Date Wed, 05 Sep 2007 09:22:33 GMT

     [ https://issues.apache.org/jira/browse/FILEUPLOAD-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Yandell closed FILEUPLOAD-139.
------------------------------------

    Resolution: Fixed

svn ci -m "Applying the patch from FILEUPLOAD-139 so that comma separators are supported (as
per rfc1867) as well as semi-colons"

Sending        src/java/org/apache/commons/fileupload/FileUploadBase.java
Sending        src/java/org/apache/commons/fileupload/ParameterParser.java
Sending        src/test/org/apache/commons/fileupload/ParameterParserTest.java
Transmitting file data ...
Committed revision 572918.

> [fileupload] separator of boundary doesnt match rfc1867 examples
> ----------------------------------------------------------------
>
>                 Key: FILEUPLOAD-139
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-139
>             Project: Commons FileUpload
>          Issue Type: Bug
>            Reporter: martynas
>             Fix For: 1.2.1
>
>         Attachments: FILEUPLOAD-139.patch
>
>
> [fileupload]
> in class :
> package org.apache.commons.fileupload;
> public abstract class FileUploadBase {
>     protected byte[] getBoundary(String contentType) {
>         ParameterParser parser = new ParameterParser();
>         parser.setLowerCaseNames(true);
>         // Parameter parser can handle null input
>         Map params = parser.parse(contentType, ';');
>         String boundaryStr = (String) params.get("boundary");
>         if (boundaryStr == null) {
>             return null;
>         }
>         byte[] boundary;
>         try {
>             boundary = boundaryStr.getBytes("ISO-8859-1");
>         } catch (UnsupportedEncodingException e) {
>             boundary = boundaryStr.getBytes();
>         }
>         return boundary;
>     }
> }
> String :  Map params = parser.parse(contentType, ';');
> doesn't match http://www.ietf.org/rfc/rfc1867.txt document
> because in all examples:
> Content-type: multipart/form-data , boundary=AaB03x
> Content-type: multipart/form-data, boundary=AaB03x
> Content-type: multipart/mixed, boundary=BbC04y
> boundary separated by comma (but not semicolon)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message