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