Last-Modified Header

2009-06-10 Thread Sherif Ahmed
I've been trying to add Last-Modified Header via the following code in a Filter afterHandle method Form responseHeaders = (Form) response.getAttributes().get(org.restlet.http.headers); if (responseHeaders == null) { responseHeaders = new Form();

Re: Last-Modified Header

2009-06-10 Thread Jonathan Hall
Hi Sherif, For custom headers whatever name you give, entity.modificationDate, will be used. However, what you probably meant to do is use setModificationDate(new Date()) on the entity/response representation. ie. representation.setModificationDate(new Date()); Jon Sherif Ahmed wrote:

RE: ERROR messages in log file

2009-06-10 Thread Jerome Louvel
Hi Denys, This is produced by the LogService. It is similar to regular Web servers logging except that it goes in the console by default. To customize logging level and output formats, check: http://wiki.restlet.org/docs_1.2/13-restlet/48-restlet/101-restlet.html You can also turn it off

Atom Pub Server / atomojo

2009-06-10 Thread webpost
Hello I'm looking for a solution to run an Atom Pub Server preferably within Restlet, but it might also be standalone. Implementing all resources and handling seems to be overkill, isn't there something already available. I tried atomojo but I simply can't get it running, or let's say I can't

PROBLEM WITH org.restlet.representation.InputRepresentation IN 1.2-M2

2009-06-10 Thread Denys Hryvastov
Hi all - I am using Restlet 1.2-M2 and I have some troubles. Let me describe briefly: The problem that happens with me occurs because the org.restlet.represen tation.InputRepresen​tation class makes a reference to the org.apache.catalina.​connector.CoyoteInpu​tStream, which Tomcat uses, and on

PROBLEM WITH org.restlet.representation.InputRepresentation IN 1.2-M2

2009-06-10 Thread Denys Hryvastov
Hi all - I am using Restlet 1.2-M2 and I have some troubles. Let me describe briefly: The problem that happens with me occurs because the org.restlet.representation.InputRepresentation class makes a reference to the org.apache.catalina.connector.CoyoteInputStream, which Tomcat uses, and on

RE: GAE+oAuth

2009-06-10 Thread Jerome Louvel
Hi Ivan, Our OAuth extension is currently lacking user documentation. We are looking for help on this front (hint!): OAuth extension http://wiki.restlet.org/docs_1.2/13-restlet/28-restlet/80-restlet.html Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~

RE: JSON and File Representation

2009-06-10 Thread Jerome Louvel
Hi Thomas, I would use another representation, or even another resource unless they do represent the same state. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine-

RE: from the org.restlet.data.Request, get the HttpServletRequest

2009-06-10 Thread Jerome Louvel
Hi Marc, Could you try the static ServletCall#getRequest(Request request): HttpServletRequest? If it doesn't work, then something change in the code during Restlet 2.0 refactoring. Which version are you using BTW? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~

RE: Restlet 2.0 M3 released

2009-06-10 Thread Jerome Louvel
Hi Tal, This should now be fixed in SVN trunk. Could you confirm? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Tal Liron

RE: Relative URI in GWT Restlet

2009-06-10 Thread Jerome Louvel
Hi Wish, What is your ServletContainer? There is a known bug with WebLogic regarding port 80: Locating REST resources on Port 80, Receive 404 http://restlet.tigris.org/issues/show_bug.cgi?id=710 We have very recently checked in a workaround in SVN trunk for this. Could you try again with a

RE: Re: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
Thanks Jon. What I am trying to accomplish is implementing the Last-Modified / If-Modified-Since logic. Where I would tag responses with a uniform Last-Modified header for all resources/representations and when a request comes in with a If-Modified-Since header I'd send appropriate HTTP 304

Re: Re: Last-Modified Header

2009-06-10 Thread Rob Heittman
Restlet provides the 304 plumbing for you. Just setModificationDate() on your Resource's returned Representation as Jon suggests. The GET headers returned from my Web site which calls this function are below. If you hit this resource with Firefox and watch it with Firebug as you refresh (which

Re: Pagination

2009-06-10 Thread Dustin N. Jenkins
I assume the POST/Redirect/GET pattern is the Client POSTing to the Resource, and instead of filling the Response's Entity with the Representation of the change, one simply redirects the Client to the GET representation. Is this the desired behaviour? I was under the impression that

RE: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
Brilliant.. The more I use Restlet the more I am liking it indeed. Now does Restlet has a framework to take care of Gzip encoding results when the Request headers indicate that the request is from a client that supports this encoding (all modern browsers do) I've been trying to add

RE: Re: Re: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
Cool, This works as you indicate. However implementing this way has a downside. Would be nice that the framework could take care of sending a 304 even without having to get a concrete Representation which has a date set. The idea is to avoid creating a Representation if the Resource has not

Re: Re: Re: Last-Modified Header

2009-06-10 Thread Rob Heittman
I can't imagine how the framework would be able to figure that out on its own without being able to examine the Representation ... chicken, egg, chicken, egg. Still, I understand the concern if Representations are expensive to generate. I wonder if the conditional logic fetches the entity body if

Re: Restlet 2.0 M3 released

2009-06-10 Thread Tal Liron
Hi Jerome, The Directory class now seems fixed, and well in negotiated mode. However... the SVN version breaks negotiated mode for all the rest of my ServerResources. Unless I explicitly setNegotiated(false) for them, they all return error 406 for every GET. -Tal Jerome Louvel wrote: