Files
ofbiz-framework/framework/webapp
Jacques Le Roux 81dc18d40c A rearranged patch from Gareth Carter for "Update SimpleContentViewHandler to return mime type on file extension and use inline for content-disposition" https://issues.apache.org/jira/browse/OFBIZ-6702
SimpleContentViewHandler will return mime type 'text/html' for all DataResource values without a specified mimeTypeId. Changing to DataResourceWorker.getMimeType will allow determining the mimeTypeId by file extension 
Fixing the mime type will allow the browsers to display content inline if UtilHttp is updated aswell. All unknown extensions will be set to octet-stream causing the browser to prompt for download

jleroux: after some discussions, this finally uses a content-disposition-type property in requestHandler.properties to allow more flexibility for users (see UtilHttp.setContentDisposition() method). Beware "inline" is less secure. For this reason, Gareth forced the "dangerous" text/html mime type to application/octet-stream in SimpleContentViewHandler class. This to prevent possible static XSS attacks. See the Jira issue for more details.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1712835 13f79535-47bb-0310-9956-ffa450edef68
2015-11-05 17:47:00 +00:00
..
2014-09-02 14:18:17 +00:00