I tried the following to create a write-only DAV directory:
(defmethod accept-request-p ((resource-class (eql 'authorized-file-resource)) request) "We just use the method for FILE-RESOURCE." (if (eql (tbnl:request-method*) :get) nil (accept-request-p 'file-resource request)))
but instead of getting a "resource not available" when I try to get a file I instead get the hunchentoot default page. Needless to say, this is not what I expected. Is this a bug in cl-webdav, or a bug in my expectations?
Thanks, rg
How did you set up your WebDAV server? Surely, this is not the only code you have? Did you create a dispatcher for your class and did you activate it?
Edi.
On Sun, Sep 12, 2010 at 9:06 AM, Ron Garret ron@flownet.com wrote:
I tried the following to create a write-only DAV directory:
(defmethod accept-request-p ((resource-class (eql 'authorized-file-resource)) request) "We just use the method for FILE-RESOURCE." (if (eql (tbnl:request-method*) :get) nil (accept-request-p 'file-resource request)))
but instead of getting a "resource not available" when I try to get a file I instead get the hunchentoot default page. Needless to say, this is not what I expected. Is this a bug in cl-webdav, or a bug in my expectations?
Thanks, rg
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel
Sorry, I misread your code. No, this is not a bug, it's expected behavior and what's written in the documentation. By returning NIL you're saying that you don't want to handle this request, so the next dispatcher is tried which in your case seems to be Hunchentoot's default dispatcher.
If by "resource not available" you mean the "404 not found" message, you need to look at the resource-exists generic function.
Edi.
On Wed, Sep 15, 2010 at 12:22 AM, Edi Weitz edi@agharta.de wrote:
How did you set up your WebDAV server? Surely, this is not the only code you have? Did you create a dispatcher for your class and did you activate it?
Edi.
On Sun, Sep 12, 2010 at 9:06 AM, Ron Garret ron@flownet.com wrote:
I tried the following to create a write-only DAV directory:
(defmethod accept-request-p ((resource-class (eql 'authorized-file-resource)) request) "We just use the method for FILE-RESOURCE." (if (eql (tbnl:request-method*) :get) nil (accept-request-p 'file-resource request)))
but instead of getting a "resource not available" when I try to get a file I instead get the hunchentoot default page. Needless to say, this is not what I expected. Is this a bug in cl-webdav, or a bug in my expectations?
Thanks, rg
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel