ops4j / org.ops4j.pax.web

OSGi R7 Http Service, Whiteboard and Web Applications (OSGi CMPN Release chapters 102, 140 and 128) implementation using Jetty 9, Tomcat 9 or Undertow 2.
https://ops4j1.jira.com/wiki/display/paxweb/Pax+Web
Other
144 stars 183 forks source link

MIME type resolution doesn't work in pax-web-jetty [PAXWEB-317] #659

Closed ops4j-issues closed 12 years ago

ops4j-issues commented 12 years ago

Raul Kripalani created PAXWEB-317

MyFaces does some clever magic so that when a browser requests a resource, it will return different types of InputStreams depending on the MIME type of the resource that was requested. If it is a file, it will return a standard InputStream, but if it is a CSS file, it will return a special stream called "ValueExpressionFilterInputStream", which preprocesses the CSS file and resolves all EL expressions into an actual result.

The problem is that the current version of pax-web is unable to resolve MIME types from SContext.getMimeTypes() because if the mime type is not defined in the app's web.xml, it will fall back to the HttpContext (Pax Web's DefaultHttpContext) which ultimately always returns null.


Affects: 1.0.7, 1.1.1, 2.0.0 Fixed in: 1.0.8, 1.1.2, 2.0.0 Votes: 0, Watches: 0


Referenced issues

relates to:

ops4j-issues commented 12 years ago

Raul Kripalani commented

SContext.getMimeTypes() should delegate to Jetty which already provides MIME type resolution functionality.

ops4j-issues commented 12 years ago

Raul Kripalani commented

Fixed. Commits:

ops4j-issues commented 12 years ago

Raul Kripalani commented

Going forward, the MIME type resolution mechanism should be reworked