Author: nmalin
Date: Sat Apr 13 09:29:43 2019
New Revision: 1857458
URL:
http://svn.apache.org/viewvc?rev=1857458&view=revLog:
Fixed: Backport, Escape potential NPE when call DataEvents.serverImage by mocked request
Modified:
ofbiz/ofbiz-framework/branches/release17.12/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java
Modified: ofbiz/ofbiz-framework/branches/release17.12/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java?rev=1857458&r1=1857457&r2=1857458&view=diff==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java Sat Apr 13 09:29:43 2019
@@ -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";
}