So I removed the code that initialized a new instance of the TunnelService
as apparently it was enabled by default already. I have successfully tested
the request POST http://host/app/resource/15?method=UPDATE. However
performing a DELETE operation the same way results in a GET. The tomcat logs
do not give any stack traces or other output that would indicate something
is wrong. I also have logger messages set to display when the
removeRepresentation method is called but am seeing nothing in the logs.
Lastly, I can confirm DELETE http://host/app/resource/15 works using a
restlet java client for testing.

This seems quite strange.

Jean-Philippe


On Sat, Jan 31, 2009 at 4:27 AM, Jerome Louvel <jerome.lou...@noelios.com>wrote:

>  Hello,
>
> This should really work... The tunnel service is enabled by default, so the
> first line shouldn't even be necessary. What is displayed in the logs? If
> the tunnel service works as expected, you should see DELETE as the invoked
> method.
>
> Otherwise, I would suggest to send us a small reproducible sample or to
> debug the TunnelFilter code if you are willing to dig into Restlet code :)
>
>  Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>  ------------------------------
> *De :* Jean-Philippe Steinmetz [mailto:caskate...@gmail.com]
> *Envoyé :* samedi 31 janvier 2009 00:39
> *À :* discuss@restlet.tigris.org
> *Objet :* Re: Overriding HTTP headers
>
> Ok. I've added the following to my Application's constructor.
>
> getTunnelService().setEnabled(true);
>
> But when I try and perform the following:
>
> POST http://host/resource/1?method=DELETE
>
> All it does is retrieve the resource.
>
> Am I missing something?
>
> On Fri, Jan 30, 2009 at 12:01 AM, Karel Vervaeke 
> <ka...@outerthought.org>wrote:
>
>> Just scanning your mail diagonally I think you need to add the method
>> parameter to your query string (in combination with POST requests):
>>
>> http://host/path?method=PUT
>> http://host/path?method=DELETE
>>
>> (You should have the tunnel service enabled)
>>
>> HTH,
>> Karel
>>
>> On Fri, Jan 30, 2009 at 8:00 AM, Jean-Philippe Steinmetz
>> <caskate...@gmail.com> wrote:
>> > Hello again,
>> >
>> > One of my REST clients will be a Flash application. As some or all of
>> you
>> > are aware Flash's URLRequest is a bit broken in that it doesn't fully
>> > support the HTTP protocol. I have tried using arc90restlib that Jerome
>> > suggested at http://lab.arc90.com/2008/03/restservice.php but
>> unfortunately
>> > all I get are IOErrors when a request is sent anywhere. It could be that
>> i'm
>> > loading in a Flex library into a Flash app but it's a bit hard too
>> difficult
>> > to debug at this point. I can only assume there is an issue with the
>> > library. Short of writing my own HTTP socket library I was given a tip
>> on
>> > using Flash's built-in URLRequest method and utilizing override headers
>> to
>> > perform the PUT and DELETE operations. Specifically I am adding the
>> header
>> > X-HTTP-Method-Override with the correct action I desire. Now to the
>> point;
>> > does RESTlet support these headers? Does anyone else have any
>> suggestions on
>> > how to make this Flash client talk?
>> >
>> > Jean-Philippe
>> >
>>
>> ------------------------------------------------------
>>
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1072845
>>
>
>

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

Reply via email to