-
New Feature
-
Resolution: Done
-
Normal
-
9.0.0
-
Security Level: Jimmy
-
ZK 9.5.1 S1
-
None
Steps to Reproduce
trigger a download with a specific charset
byte[] data = "Price 500,00 €".getBytes("ISO-8859-15"); Filedownload.save(data, "text/plain;charset=ISO-8859-15", "mytext.txt");
or a binary download without a character encoding
Filedownload.save("mysheet.xls", "application/vnd.ms-excel");
Current Result
the response header appends ;charset=utf-8 unnecessarily for binary files or overrides the provided values
Content-Type: text/plain;charset=utf-8 Content-Type: application/vnd.ms-excel;charset=utf-8
Expected Result
Content-Type: text/plain;charset=ISO-8859-15 Content-Type: application/vnd.ms-excel
Debug Information
for each response the character encoding is set to utf-8
https://github.com/zkoss/zk/blob/v9.0.0-RC2/zk/src/org/zkoss/zk/au/http/DHtmlUpdateServlet.java#L453