Hi Ivan,

Thanks for the tip; I've added it to this RFE:

"Support cross-domain HTTP/JSON requests in GWT"
http://restlet.tigris.org/issues/show_bug.cgi?id=996

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com




-----Message d'origine-----
De : Ivan Jaramillo [mailto:[email protected]] 
Envoyé : mardi 23 mars 2010 23:33
À : [email protected]
Objet : RE: Re: Restlet GWT: Problem with HTTP POST request in Firefox

See this for firefox OPTIONS method and the comon same-origin policy:

https://developer.mozilla.org/En/HTTP_access_control

use @OPTIONS method in ur resourse and set this headers, allowed method and
origin, like this:

ex.
http://blog.arc90.com/2008/09/15/custom-http-response-headers-with-restlet/

@OPTIONS     
private void generateResponseHeaders(){  
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", "the value");
}

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

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

Reply via email to