cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1541141 - /cxf/trunk/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
Date Tue, 12 Nov 2013 16:57:31 GMT
Author: dkulp
Date: Tue Nov 12 16:57:31 2013
New Revision: 1541141

URL: http://svn.apache.org/r1541141
Log:
[CXF-5368] Check for both filename and name in Content-Disposition

Modified:
    cxf/trunk/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java

Modified: cxf/trunk/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java?rev=1541141&r1=1541140&r2=1541141&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java (original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java Tue Nov 12
16:57:31 2013
@@ -348,7 +348,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 InputStream decode(InputStream in, String encoding) throws IOException
{



Mime
View raw message