Skip to content

Commit

Permalink
[CXF-5368] Check for both filename and name in Content-Disposition
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1541141 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dkulp committed Nov 12, 2013
1 parent b5c38cc commit c167490
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -348,7 +348,12 @@ static String getContentDispositionFileName(String cd) {
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 {
Expand Down

0 comments on commit c167490

Please sign in to comment.