Task #38 — Writer2Stream corrupts dataAttached to Project — Jsp File Browser
Opened by James Telfer (jt) - 9 Aug 2007
|Task Type||Bug Report||Severity||Critical|
|Category||File handling||Reported Version||1.2|
|Status||Unconfirmed||Due in Version||Undecided|
|Assigned To||No-one||Percent Complete|
The Writer2Stream class causes downloaded binary files to be corrupted. This class should be removed, and replaced by 'response.getOutputStream()'. This provides an OutputStream instance that will allow binary output to be written to the response.
For example, changing line 1016 from:
OutputStream out_s = new Writer2Stream(out);
OutputStream out_s = response.getOutputStream();
Fixes the download file bug. The same bug exists for zip downloads as well, and I suppose any other place this class is used.