Re: platform http ibrary
- From: Greg Stein <gstein lyra org>
- To: Daniel Veillard <veillard redhat com>, Maciej Stachowiak <mjs noisehavoc org>, Iain <iain ximian com>, Justin Maurer <justin slashdot org>, Christian Schaller <uraeus linuxrising org>, gnome-2-0-list gnome org
- Subject: Re: platform http ibrary
- Date: Tue, 27 Nov 2001 15:29:30 -0800
On Wed, Nov 21, 2001 at 05:39:38PM -0500, Daniel Veillard wrote:
> On Wed, Nov 21, 2001 at 01:48:43PM -0800, Maciej Stachowiak wrote:
> > On 21Nov2001 04:46PM (-0500), Daniel Veillard wrote:
> > > My main irritation as a web site maintainer about using gnome-vfs
> > > for general web browsing is that it should cache the fact that a given
> > > server doesn't provide PROPFIND capabilities. This would effectively
> > > divide by 2 the number of request made (I detected this while looking
> > > at rpmfind web server logs and finding PROPFIND/GET/PROPFIND/GET sequences
> > > from gnome-vfs clients :-).
> >
> > OK, I'd love to help come up with a solution to this problem. For how
> > long do you think it's valid to cache lack of PROPFIND? Is PROPFIND
> > always either supported for a whole slite or not at all (so that the
> > caching could be done on a per-host basis)?
PROPFIND support can be configured on a per-directory basis. For example, I
use the following Apache config block all the time:
<Location /dav>
DAV On
</Location>
Of course, that path can be anything, and it enables WebDAV support for just
that one location (and children). This per-dir feature is pretty much the
same for all DAV servers.
I would recommend sending an OPTIONS request to the target location when you
first connect to the server (you *are* using persistent connections, right?
:-). In the OPTIONS result, will be the DAV: header, indicating WebDAV
support on the server. If the header is not present, then it does not have
DAV support, and you don't want to bother sending PROPFINDs.
If you're using persistent connections, then caching it for the life of the
connection should be quite sufficient (the OPTIONS request is a very small
overhead).
If you aren't using persistent connections, then I would suggest caching it
for the lifetime of the application (or a GNOME session suspend/resume
event). But your larger priority (IMO :-) would be to add persistence.
In general, I would think that if the directory has DAV support, then it
will probably always have DAV support. So you could record that fact and
just keep sending PROPFIND. And the failure mode is pretty easy: the first
time your PROPFIND returns 405 (Method Not Allowed) or 501 (Not
Implemented), then you mark that directory as "not DAV-enabled". Detecting a
transition from non-DAV to DAV is a bit harder since you want to ask "how
often should I probe?" I'd recommend the caching guidelines above. In
Nautilus, you could also do a probe if somebody manually attempts to switch
a view from HTML-rendering (i.e. standard web browsing) to a DAV view.
I'm not sure if that covers all the questions, or how many questions it
generated :-), but just ask away. I'm not subscribed to the gnome-2-0-list,
so please CC me if needed.
Cheers,
-g
p.s. and I'd also note that I'm saddened that gnome-vfs reimplemented so
much HTTP/DAV functionality that was already in Neon (which I pointed people
at last year or so). So it goes... :-)
--
Greg Stein, http://www.lyra.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]