Re: HTTP writing



On Fri, Apr 11, 2008 at 8:01 AM, Christian Kellner <gicmo gnome org> wrote:
>  I'd be willing to do that, but of course then we will need a virtual
>  "stat" function that needs to be implemented differently by WebDAV. That
>  stat function is necessary mainly for DELETE, since we shouldn't be
>  deleting directory that are not empty. So we first have to "stat" the
>  target to see if that precondition is fulfilled. Also a lot of old
>  apache servers (or mod_dav) are broken and can't handle the
>  "If-None-Match" header correctly. So we need to "stat" in the case of
>  the _create () call.

Well, in terms of the _create() call, the code already uses the
generic HEAD 'stat'.  The only trick is the missing stat for DELETE.
And it strikes me that checking for non-empty directories on the
client side is sort of a WebDAV-specific thing.  Or, at least a thing
that's only possible because DAV has more support for doing that
check.  Couldn't the HTTP backend just make the DELETE call, and DAV
implement its own more-check-filled DELETE handler?

Or is preventing a non-empty-directory-delete so important from a user
POV that you don't want to leave it up to the HTTP server handling the
DELETE? (though I suspect any server handling it would fail on such a
request, as they probably naively make system rm calls that would
fail)

If DELETE is a problem, I'm fine with leaving it out of the HTTP
backend.  But moving the writing support in is very useful, and
doesn't depend on any DAV calls.

-mt


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]