> On 23.04.2010 21:20, Jason Chen wrote: >> Hi everyone, >> >> I just recently started using Sling so I have a few questions that I have to >> ask. >> >> Is it possible for curl to specify a MIME type and have Sling resolve the >> file for me when I choose to GET it? >> >> For example, >> I have a html page at http://localhost:8080/content/mynode/testing.html >> >> If I were to ask curl to get a file of mime type text/html, and specify the >> url to be at http://localhost:8080/content/mynode/testing, will Sling know >> that I am talking about testing.html?
On Mon, Apr 26, 2010 at 9:07 AM, Felix Meschberger <[email protected]> wrote: > I assume you specify the text/html requested MIME type in the Accept > request header ? > > No, support for the Accept header to resolve a request's resource is not > implemented at the moment. That said, it should be quite easy to write a servlet to do that resolution. The servlet would hold a map of MIME types and corresponding extensions ("text/html" => ".html"), and use that map to forward requests to the correct script. -- Vidar S. Ramdal <[email protected]> - http://www.idium.no Sommerrogata 13-15, N-0255 Oslo, Norway + 47 22 00 84 00 / +47 21 531941, ext 2070
