cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1541154 - /cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
Date Tue, 12 Nov 2013 17:05:06 GMT
Author: dkulp
Date: Tue Nov 12 17:05:05 2013
New Revision: 1541154

URL: http://svn.apache.org/r1541154
Log:
Merged revisions 1541141 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1541141 | dkulp | 2013-11-12 11:57:31 -0500 (Tue, 12 Nov 2013) | 2 lines

  [CXF-5368] Check for both filename and name in Content-Disposition

........

Modified:
    cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java

Modified: cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java?rev=1541154&r1=1541153&r2=1541154&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
(original)
+++ cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
Tue Nov 12 17:05:05 2013
@@ -335,7 +335,12 @@ public final class AttachmentUtil {
             return null;
         }
         //TODO: save ContentDisposition directly 
-        return new ContentDisposition(cd).getParameter("filename");
+        ContentDisposition c = new ContentDisposition(cd);
+        String s = c.getParameter("filename");
+        if (s == null) {
+            s = c.getParameter("name");
+        }
+        return s;
     }
     
     public static boolean isTypeSupported(String contentType, List<String> types) {



Mime
View raw message