W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1996

Again: Putable Resource!

From: Anselm Baird-Smith <abaird@w3.org>
Date: Mon, 23 Sep 1996 10:29:24 +0500
Message-Id: <9609231429.AA27899@www18.w3.org>
To: wplatzer <wplatzer@iaik.tu-graz.ac.at>
Cc: Jigsaw Mailing List <www-jigsaw@w3.org>
 > After checking everything I tried again to upload a file to a Jigsaw Puta=
 > bleDirectory, but it still didn't work.
 > Because Anselm said, this should work I started my debugger.
 > .. a couple of days later ...
 > I think I have the solution of the problem:
 > 1) PutableDirectory uses createResource in its lookup method if there is =
 > no such resource
 > 2) createResource calls createDefaultResource from class DirectoryResourc=
 > e and this one calls the indexer (indexer.createResource) to create a new=
 >  resource.
 > 3) Now the indexer creates a new file resource (createFileResource) and u=
 > ses the default attributes from FileResource (AttributeRegistery.getClass=
 > Attributes(cls)).
 > 4) But the default value for attribute putable in FileResource is false
 > 5) ...
 > 6) At last method put in FileResource checks that putable flag and becaus=
 > e it's false calls super.put(request), which is the put method from HTTPR=
 > esource. And this put generates the message: Method PUT not implemented.
 >     public Reply put(Request request)
 > =09throws HTTPException
 >     {
 > =09Reply error =3D request.makeReply(HTTP.NOT_IMPLEMENTED) ;
 > =09error.setContent("Method PUT not implemented.") ;
 > =09throw new HTTPException (error) ;
 >     }
 > How can I fix this problem or is something different wrong?

You are right (and your steps are exactly the right overview of what's
happening). Sorry for the confusion (it's very difficult for me to
make sure that everything is set properly, I often forget things that
seems obvious to me, but which are not in fact, sorry again).

What you want to do is to update the /Admin/Extensions/html extension,
and make all html files editable by default (eg turn putable flag to
true for the html extension). Once this is done, all html FileResource
created *after that point*, will inherit the putable flag value (eg
true), and in particular the resources created through PUT. Of course,
once you have done this, make sure you have an authentication filter
on the root resource of your server, that allows the PUT method only
to the appropriate persons...

Let me know how it goes,
Received on Monday, 23 September 1996 10:38:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:30 UTC