commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1455858 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/ServletFileUpload.java
Date Wed, 13 Mar 2013 10:08:43 GMT
Author: simonetripodi
Date: Wed Mar 13 10:08:43 2013
New Revision: 1455858

URL: http://svn.apache.org/r1455858
Log:
[FILEUPLOAD-229] RFC-2616 5.1.1 Method states that http methods are case-sensitive, so there
is no need for equalsIgnoreCase or toLowerCase at all and "POST".equals(...) should just do
it

Modified:
    commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/ServletFileUpload.java

Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/ServletFileUpload.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/ServletFileUpload.java?rev=1455858&r1=1455857&r2=1455858&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/ServletFileUpload.java
(original)
+++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/ServletFileUpload.java
Wed Mar 13 10:08:43 2013
@@ -49,7 +49,7 @@ public class ServletFileUpload extends F
     /**
      * Constant for HTTP POST method.
      */
-    private static final String POST_METHOD = "post";
+    private static final String POST_METHOD = "POST";
 
     // ---------------------------------------------------------- Class methods
 
@@ -64,7 +64,7 @@ public class ServletFileUpload extends F
      */
     public static final boolean isMultipartContent(
             HttpServletRequest request) {
-        if (!POST_METHOD.equals(request.getMethod().toLowerCase())) {
+        if (!POST_METHOD.equals(request.getMethod())) {
             return false;
         }
         String contentType = request.getContentType();



Mime
View raw message