Re: HTTP writing



Hey,

> 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?
Doesn't S3 have support for directories? And if so, can you delete them
 by doing a "DELETE" call?  

> 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)
Yes it is that important since we guarantee that in the gio client API.
From the API docs of g_file_delete (): "Deletes a file. If the file is a
directory, it will only be deleted if it is empty." I know that some of
those semantics are a pain for webdav but that's the way it is. We also
can't rely on server bugs, i.e. that they only call rmdir (2).
 
> 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.
I am all for sharing code, and a little vfunc doesnt seem to be a big
problem, I am not sure why you seem to be so against it. You will need
some kind of stat call for query_info() and enumerate() anyways. Also
having that might it make possible to share code for upload as well.

On a different note: Does S3 have support for locking files/direcotires?

Cheers,
Christian

Attachment: signature.asc
Description: This is a digitally signed message part



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