You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/11/06 20:15:11 UTC

svn commit: r711948 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java

Author: hansbak
Date: Thu Nov  6 11:14:57 2008
New Revision: 711948

URL: http://svn.apache.org/viewvc?rev=711948&view=rev
Log:
small improvement on previous commit

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java?rev=711948&r1=711947&r2=711948&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java Thu Nov  6 11:14:57 2008
@@ -145,7 +145,7 @@
             String contentType2 = UtilValidate.isNotEmpty(mimeTypeId) ? mimeTypeId + "; charset=" +charset : contentType;
             String fileName = null;
             if (!UtilValidate.isEmpty(dataResource.getString("dataResourceName"))) {
-            	fileName = dataResource.getString("dataResourceName");
+            	fileName = dataResource.getString("dataResourceName").replace(" ", "_"); // spaces in filenames can be a problem
             }
             UtilHttp.streamContentToBrowser(response, bais, byteBuffer.limit(), contentType2, fileName);
         } catch(GenericEntityException e) {