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
10 lines
443 B
Properties
10 lines
443 B
Properties
# -- N if you want to use external requests, see OFBIZ-5037
|
|
throwRequestHandlerExceptionOnMissingLocalRequest=Y
|
|
|
|
# -- Default HTTP status-code, see OFBIZ-5109
|
|
status-code=302
|
|
|
|
# -- Default Content-Disposition type
|
|
#-- attachment might be replaced by inline if you prefer to offer this option to your users.
|
|
# attachment is supposed to be more secure, but this is a bit unclear see OFBIZ-6702 for details
|
|
content-disposition-type=attachment |