vaadin / framework

Vaadin 6, 7, 8 is a Java framework for modern Java web applications.
http://vaadin.com/
Other
1.78k stars 729 forks source link

DownloadStream getContentDispositionFilename wrongly performs URL encoding on filenames #8230

Closed roeltje25 closed 7 years ago

roeltje25 commented 7 years ago

In the DownloadStream class getContentDispositionFilename generates a URL encoded filename and encloses it between quotes. When I use e.g. a filename with spaces this results in the final download save as window to include + signs in the file name. This is of course not wanted. Instead the encoding should follow the RFCs 2183 and 2184. In short it's a bit more cumbersome, but at least when between double quotes, it should not be URL encoded.

related class is com.vaadin.server.DownloadStream line 331 for Vaadin version 7.7.6

EDIT: it apparently should be URL encoded for firefox. but not completely it should be a pure percent encoding so the proposed revision should be on line 333 String encodedFilename = URLEncoder.encode(filename, "UTF-8").replace("+", "%20");

Legioth commented 7 years ago

I believe this was fixed by #6607 which will be included in the next maintenance release we do.

Legioth commented 7 years ago

I'll just close this based on the assumption that it's a duplicate of #6607. Please reopen if it turns out that this is not the case.