Hi Dustin, We did fixed a related issue in the recent past. I would encourage upgrading to the newly released Restlet 2.0 M6 version.
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 : Dustin N. Jenkins [mailto:[email protected]] Envoyé : vendredi 20 novembre 2009 16:29 À : [email protected] Objet : Re: POST ignored in RESTlet 2.0Mx Hi Thierry, That's right, my @Post method is not being called. I'm expecting the additional @Get as part of the redirect, but the initial @Post should still be called. If I restart my Tomcat container, then it works for one, maybe two requests, then it simply goes straight to the @Get method, but the logs still show a POST request. I've also attached my debugger to the @Post and @Get methods to be sure, and only the @Get method is called, and if I call getMethod() from within there, it says it's a POST, so it's a little confusing. This is why I was thinking that something is cached and the @Post is skipped, but it's just a guess. The latest snapshot seems better, though, so I'm going to work with that for a while to see if it stays more stable. Thanks for the reply, Dustin Thierry Boileau wrote: > Hi Dustin, > > something is not clear for me. When you send a post request to your > resource, is your "post" method called or not? > If not, there is a problem. Otherwise, as said Stephan, a redirection > makes your browser makes automatically an additional GET request the new > location. > > Best regards, > Thierry Boileau > > >> Hi Dustin, >> >> 303 (see other) says, that the result is at the given location, and you >> have to get it with GET. So the behaviour is right. >> Use 301 (Moved Permanently) or 307 (Temporary redirect). >> See http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection >> >> best regards >> Stephan >> >> Dustin N. Jenkins schrieb: >> >> >>> I'm using Java 6, Tomcat 6.0.20, RESTlet 2.0M5 on a Linux platform. >>> >>> After my business operations in my POST call, I simply call >>> redirectSeeOther(). When I make POST calls to the Resource now, the log >>> records it as a POST call, but my @Get method is being called instead. >>> Does the redirectSeeOther() get cached somewhere or something? Normally >>> I'd see a POST followed by a GET in the log. Is this a bug in the >>> current 2.0 tree? The snapshot is doing the same thing. >>> >>> I've used wget and browser clients just to test this. >>> >>> Thanks, >>> Dustin >>> >>> >>> >> ------------------------------------------------------ >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2420195 >> >> >> > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2420445 > -- Dustin N. Jenkins | Tel/Tél: 250.363.3101 | [email protected] facsimile/télécopieur: (250) 363-0045 National Research Council Canada | 5071 West Saanich Rd, Victoria BC. V9E 2E7 Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria (C.-B) V9E 2E7 Government of Canada | Gouvernement du Canada ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2420921 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2423510

