Hello,

I'm using the CLAP protocol to get static content such as JavaScript 
delivered. I'd like to have those expire way down in the future since I use 
URLs that encode the file version and some of the JS libraries I use create 
quite a few hits to the server. I'm using Restlet 1.1.2 with the Restlet 
engine.

I've tried a number of things, but nothing seems to work. What I am 
currently doing is this:

    public static void main(String[] args) throws Exception {
        Component component = new Component();
        component.getServers().add(Protocol.HTTP, 
configuration.getHttpPort());
        
component.getClients().add(Protocol.CLAP).getContext().getParameters().add("timeToLive","604800");

        component.getDefaultHost().attach(new Pronto());

        component.start();
    }

and in createRoot() I have a Router to which I attach a directory like this:

        router.attach("/javascript",
                new Directory(getContext(),
                LocalReference.createClapReference(LocalReference.CLAP_THREAD, 
"/javascript")));

I can't see any relevant header in the responses, though -- somehow setting 
the parameter doesn't seem to have any impact. Am I missing something?

BTW: the "Server" header says "Noelios-Restlet-Engine/1.1..2", which I 
suppose has a dot too many.

Regards,
   Peter

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1196339

Reply via email to