Fixed: Backport, Escape potential NPE when call DataEvents.serverImage by mocked request
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857458 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -270,7 +270,7 @@ public class DataEvents {
|
||||
|
||||
// hack for IE and mime types
|
||||
String userAgent = request.getHeader("User-Agent");
|
||||
if (userAgent.indexOf("MSIE") > -1) {
|
||||
if (userAgent != null && userAgent.indexOf("MSIE") > -1) {
|
||||
Debug.logInfo("Found MSIE changing mime type from - " + mimeType, module);
|
||||
mimeType = "application/octet-stream";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user