[Yanel-commits] rev 22747 - public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Sat Feb 17 21:13:36 CET 2007


Author: michi
Date: 2007-02-17 21:13:34 +0100 (Sat, 17 Feb 2007)
New Revision: 22747

Modified:
   public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources/DirectoryResource.java
Log:
get mime type fixed

Modified: public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources/DirectoryResource.java
===================================================================
--- public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources/DirectoryResource.java	2007-02-17 20:13:02 UTC (rev 22746)
+++ public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources/DirectoryResource.java	2007-02-17 20:13:34 UTC (rev 22747)
@@ -158,7 +158,7 @@
                 }
             }
             // TODO: Is this the best way to generate an InputStream from an OutputStream?
-            defaultView.setMimeType(getMimeType());
+            defaultView.setMimeType(getMimeType(viewId));
             defaultView.setInputStream(new java.io.ByteArrayInputStream(baos.toByteArray()));
         } catch (Exception e) {
             log.error(e);
@@ -208,7 +208,7 @@
     /**
      * Get mime type
      */
-    private String getMimeType() {
+    public String getMimeType(String viewId) {
         String mimeType = getRTI().getProperty("mime-type");
         if (mimeType != null) return mimeType;
 




More information about the Yanel-commits mailing list