commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mart...@apache.org
Subject cvs commit: jakarta-commons/fileupload/src/java/org/apache/commons/fileupload FileUploadBase.java
Date Sun, 10 Oct 2004 21:59:48 GMT
martinc     2004/10/10 14:59:48

  Modified:    fileupload/src/java/org/apache/commons/fileupload
                        FileUploadBase.java
  Log:
  Bug #31496 - use case-independent comparisons for encoding types.
  
  Revision  Changes    Path
  1.7       +5 -4      jakarta-commons/fileupload/src/java/org/apache/commons/fileupload/FileUploadBase.java
  
  Index: FileUploadBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/fileupload/src/java/org/apache/commons/fileupload/FileUploadBase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FileUploadBase.java	25 Feb 2004 21:07:12 -0000	1.6
  +++ FileUploadBase.java	10 Oct 2004 21:59:48 -0000	1.7
  @@ -69,7 +69,7 @@
           {
               return false;
           }
  -        if (contentType.startsWith(MULTIPART))
  +        if (contentType.toLowerCase().startsWith(MULTIPART))
           {
               return true;
           }
  @@ -245,7 +245,8 @@
           ArrayList items = new ArrayList();
           String contentType = req.getHeader(CONTENT_TYPE);
   
  -        if ((null == contentType) || (!contentType.startsWith(MULTIPART)))
  +        if ((null == contentType)
  +            || (!contentType.toLowerCase().startsWith(MULTIPART)))
           {
               throw new InvalidContentTypeException(
                   "the request doesn't contain a "
  @@ -296,7 +297,7 @@
                   {
                       String subContentType = getHeader(headers, CONTENT_TYPE);
                       if (subContentType != null && subContentType
  -                                                .startsWith(MULTIPART_MIXED))
  +                        .toLowerCase().startsWith(MULTIPART_MIXED))
                       {
                           // Multiple files.
                           byte[] subBoundary =
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message