You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/11/03 19:41:04 UTC

svn commit: r1712366 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java

Author: jleroux
Date: Tue Nov  3 18:41:04 2015
New Revision: 1712366

URL: http://svn.apache.org/viewvc?rev=1712366&view=rev
Log:
These changes accidentally slipped in with r1712347, reverting

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java?rev=1712366&r1=1712365&r2=1712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java Tue Nov  3 18:41:04 2015
@@ -969,7 +969,7 @@ public class UtilHttp {
             response.setContentType(contentType);
         }
         if (fileName != null) {
-            setContentDisposition(response, fileName);
+            response.setHeader("Content-Disposition", "attachment;filename=\"" + fileName + "\"");
         }
 
         // create the streams
@@ -1018,7 +1018,7 @@ public class UtilHttp {
             response.setContentType(contentType);
         }
         if (fileName != null) {
-            setContentDisposition(response, fileName);
+            response.setHeader("Content-Disposition", "attachment;filename=\"" + fileName + "\"");
         }
 
         // stream the content
@@ -1433,10 +1433,4 @@ public class UtilHttp {
         request.setAttribute("UNIQUE_ID", Integer.valueOf(uniqueIdNumber.intValue() + 1));
         return "autoId_" + uniqueIdNumber;
     }
-
-    public static void setContentDisposition(final HttpServletResponse response, final String filename) {
-        String dispositionType = UtilProperties.getPropertyValue("requestHandler", "content-disposition-type", "attachment");
-        response.setHeader("Content-Disposition", String.format("%s; filename=\"%s\"", dispositionType, filename));
-    }
-
 }