Hi could you please open a jira for this for further tracking?

https://team.ops4j.org/browse/PAXWEB

thanx, Achim

2011/9/28 Roland Brand <[email protected]>:
> Hi there
>
> I am working with pax-web-jetty in version 1.1.1 and would like to set the
> MIME types of my registered resources in the HttpContext. Trying this I
> recognized that HttpContext.getMimeType() is never called.
>
> By debugging I found out that the ResourceServlet determines the MIME type by
> using Jetty MimeType (see line 168 in ResourceServlet.java) instead of calling
> HttpContext.getMimeType().
>
> To meet the specification of the OSGi HTTP Service (chapter 102.4), I would
> suggest to replace those code lines (starting from line 166) with these:
>
>            //set the etag
>            response.setHeader(ETAG, eTag);
>            String mimeType = m_httpContext.getMimeType(mapping);
>            if ( mimeType == null ) {
>                Buffer mimeTypeBuf = mimeTypes.getMimeByExtension(mapping);
>                mimeType = mimeTypeBuf != null ?  mimeTypeBuf.toString() :
> null;
>            }
>
>
> Regards, Roland
>
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
>



-- 
--
*Achim Nierbeck*


Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
blog <http://notizblog.nierbeck.de/>

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to