Previous to the 2.0.11, I was able to set the responseHeaders as follows.

Form responseHeaders = (Form) 
getResponse().getAttributes().get("org.restlet.http.headers");  

if ( responseHeaders == null ) {
                responseHeaders = new Form();
                getResponse().getAttributes().put("org.restlet.http.headers", 
responseHeaders);  
        }
responseHeaders.add("Access-Control-Allow-Origin", "*");

Now, I get the following runtime error,

java.lang.ClassCastException: org.restlet.data.Parameter cannot be cast to 
org.restlet.engine.header.Header

How should I set response headers now?

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

Reply via email to