Re: Detecting requested variant based upon file extension

2008-03-06 Thread Stephan Koops
Hello Chuck, Thanks - I'll crank out a filter. One quick question...it's clear to me how I'd get the extension, and how to lookup the metadata, but it's not clear how to propagate that to the resource. How do I properly set the variant. I think you mean

Detecting requested variant based upon file extension

2008-03-05 Thread Chuck Mortimore
I'm trying to serve different representations based upon the file extension provided in the URI. For instance, if I get http://server/user/cmort.js I want to return this variant: MediaType.APPLICATION_JSON but if I get http://server/user/cmort.rss I want to return this variant:

Re: Detecting requested variant based upon file extension

2008-03-05 Thread Stephan Koops
Hello Chuck, there is a start for a solution for included in Restlet: the Metadata Service. It is for now only used by the com.noelios.restlet.application.TunnelFilter. But you can create a filter that does this, and use the MetadataService. It includes a lot of file extensions. I think,

Re: Detecting requested variant based upon file extension

2008-03-05 Thread Chuck Mortimore
Stephan Koops Stephan.Koops at web.de writes: Hello Chuck, there is a start for a solution for included in Restlet: the Metadata Service. It is for now only used by the com.noelios.restlet.application.TunnelFilter. But you can create a filter that does this, and use the