cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10277] - Cannot set MIME type for ResourceReader
Date Thu, 27 Jun 2002 12:03:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10277>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10277

Cannot set MIME type for ResourceReader





------- Additional Comments From j3322ptm@yahoo.de  2002-06-27 12:03 -------
The following addition to ResourceReader.java:
     public String getMimeType () {
+        String mimeType=parameters.getParameter("mime-type",null);
+        if( mimeType!=null ) {
+           return mimeType;
+        }
        Context ctx = ObjectModelHelper.getContext(this.objectModel);

allows pipeline snippets like
  <map:match pattern="download/**.jar">
      <map:read src="../build/lib/{1}.jar">
         <map:parameter name="mime-type" value="application/octet-stream"/>
      </map:read>
  </map:match>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message