Put request without any mime type

2012-02-09 Thread Thomas Mortagne
Hi, I have a @PUT service accepting any mime type as input. It just manipulate it as byte[]. public Response putAttachment(@PathParam(wikiName) String wikiName, @PathParam(spaceName) String spaceName, @PathParam(pageName) String pageName, @PathParam(attachmentName) String attachmentName,

How to set response header

2012-02-09 Thread Michael Kaye
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();

Re: How to set response header

2012-02-09 Thread Tim Peierls
There have been some changes in the types involved. The object returned by Response/Request.getAttributes().get(org.restlet.http.headers) is a SeriesHeader, not a Form, which is a SeriesParameter. Because of type erasure, there is no runtime problem until the Restlet Engine tries to make use of

Post problems when using Restlet Javascript Edition...

2012-02-09 Thread Richard Berger
Working on a small project to learn REST/Restlet and ran into a problem where I can successfully post from a Java client to my server or from an HTML form to my server, but when I try to post from Javascript it fails. I am following the sample code that is now on github

RE: Re: Redirecting from http to https

2012-02-09 Thread Bjorn Roche
Hello Bjorn, if I understand well, your restlet-based app listens on port 80, and receives requests with the HTTP_X_FORWARDED_PROTO header. In this cas, you can add a filter which looks at the org.restlet.http.headers attribute: if you are using restlet 2.0, you code looks like Form