Re: PostableResource problems

At 3:47 AM +1000 16/11/96, Craig Brozefsky wrote:
>On Thu, 14 Nov 1996, Steve wrote:
>
>> > Document not found
>> > The document http:blagblah is indexed but not available
>> > The server is misconfigured
>>
>> I believe this has to do with the PostableResource not converting GETs to
>> POSTs properly. I'm guessing what you did is added your resource and then
>> typed in
>
>Yah.  Since PostableResource is sub-classed from FileResource you end up
>with a call to FileResource.get() if you do not have a query string on
>the end of the URL since PostableResource.get() checks
>request.hasState('query') and fails thus invoking super.get(request)
>calling the get() method of FileResource which of course is misconfigured
>since i never assigned a filename to it.
>
>> Where 'whatever' is literally that - any characters. The GET will then be
>> properly converted to a POST and everything will work wonderfully.
>>
>> Does anyone know another way around this?
>
>I assigned a filename ot it, reluctantly.
>
>I am trying to make a resource that will take information like a CGI
>program, meaning it will allow me to use PATHINFO to pass along
>information to the resource as well as QUERYSTRING.  I am kinda perplexed
>about where I should start.  I need a resource that will snarf up the
>request even if it's not the last "filename" in the path of the URL.

Look at the w3c.jigsaw.forms.CgiResource, especially how it handles lookup
method for PATH_INFO. That would give you some ideas. You can also get
QUERYSTRING in request.getQueryString(). Also, if you want to modify the
responce of the normal resource and not produce information yourself, have
a good look into filters. They are not something you see in other web
servers often.

Hope it helps,
     Alex.
Ps. If you don't like the behaivior you can always override it. The power
is in your hands.  :-}

alex@access.com.au

Received on Friday, 15 November 1996 20:17:42 UTC