Skip to content

Commit

Permalink
Fix for empty filenames on iOS devices and wrong filenames on Android…
Browse files Browse the repository at this point in the history
… devices.
  • Loading branch information
unknown committed Mar 26, 2014
1 parent 4ff9669 commit d03831f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zweb/src/org/zkoss/web/servlet/http/Https.java
Expand Up @@ -576,8 +576,9 @@ private static String encodeFilename(HttpServletRequest request, String filename
if (agent.contains("Trident")) {
filename = URLEncoder.encode(filename, "UTF-8");
} else if (agent.contains("Mozilla")) {
byte[] bytes = filename.getBytes("UTF-8");
filename = "";
for (byte b: filename.getBytes("UTF-8")) {
for (byte b: bytes) {
filename += (char)(b & 0xff);
}
}
Expand Down

0 comments on commit d03831f

Please sign in to comment.