Subject: Re: How do I set getlastmodified using PROPPATCH ?

From: "John Glavin" <[email-masked]>
Date: Thu, 27 Jul 2000 17:37:04 -0700

Thanks for all the information on the getlastmodified property.

I was thinking about using a custom property to save the modified time
myself, however after trying this on several servers.  Most of them report a
status of

"409 (Conflict) - The client has provided a value whose semantics are not
appropriate for the property. This includes trying to set read- only
properties."

Is this error because I haven't been granted access on the server to do a
PROPPATCH, or perhaps I haven't formatted the request properly ?

I get this error on the Zope test server with an account that was created
for me, I also get it on my driveway.com account.   On the sharemation
account it seems to work fine, I can create my own properties.  On the
MyDocsOnline server, it actually accepts the proppatch with a status of 200,
however when I list all properties with propfind it is not listed.

Here is what my request looked like.

PROPPATCH /test.txt HTTP/1.1
....
....

<?xml version="1.0" encoding="utf-8" ?>
  <D:propertyupdate xmlns:D="DAV:">
  <D:set>
          <D:prop>
                  <D:webdrivemodtime>Here is my property
value</D:webdrivemodtime>
          </D:prop>
     </D:set>
   </D:propertyupdate>

Thanks,
John Glavin
[email-masked]

> Hi John,
>    We have similar synchronization (and Dav) software here and have found
> that most companies do not (and will not!) support the setting of the
> getlastmodified property.  I'd be interesting if you start hearing
> different.
>
> Jack
>
>
> -----Original Message-----
> From: John Glavin [mailto:[email-masked]]
> Sent: Thursday, July 27, 2000 3:02 AM
> To: [email-masked]
> Subject: How do I set getlastmodified using PROPPATCH ?
>
>
> Problem:
>
> I have converted my FTP application webdrive (www.webdrive.com) to support
> DAV and I need to be able to set the "getlastmodified" property using
> PROPPATCH so that utilities like powerdesk can syncrhonize files from a
> Windows PC to a DAV server.
>
> I currently retrieve the "getlastmodified" property when I generate a
> PROPFIND request on a collection (directory) and this spits out all the
> files in the directory along with all properties defined.  I have done
> testing with several servers like (Driveway.com, Zope.org,
Sharemation.com)
> and notice that they all return the "getlastmodified" property but
sometimes
> the namespace is different from server to server.  When parsing this xml
> response I always look for ":getlastmodified" to determine the time for
the
> file.
>
> Questions:
>
> Do I have to specify the namespace in xml when doing a PROPPATCH ?
>
> Is this namespace different for each server ?
>
> Is there a generic way to specify the getlastmodified time to set ?
>
> Thanks,
> John Glavin
> RiverFront Software
> [email-masked]
> http://www.riverfrontsoftware.com

---

From: Jim Whitehead <[email-masked]>
Date: Fri, 28 Jul 2000 15:10:39 -0700

> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of John Glavin
> Sent: Thursday, July 27, 2000 5:37 PM
> To: [email-masked]
> Subject: Re: How do I set getlastmodified using PROPPATCH ?
>
>

> myself, however after trying this on several servers.  Most of
> them report a status of
>

Well, I suspect that, for the Zope server, the "manage properties"
permission is not set for the resource, since they claim support for
PROPPATCH.  You should ask them directly about this, at [email-masked]. As
for Driveway and MyDocsOnline, I suspect that they have simply not
implemented PROPPATCH, since the main motivation was to support Web Folders,
which does not require PROPPATCH. You could send them email directly to
confirm this.

> value</D:webdrivemodtime>

This request looks well-formed to me.  As a style note, the DAV: namespace
is intended for use by the WebDAV protocol -- new applications should use a
non-DAV namespace.  For you, I recommend using
"http://www.riverfrontsoftware.com/", and hence your request would look
like:

<?xml version="1.0" encoding="utf-8" ?>
  <D:propertyupdate xmlns:D="DAV:"
xmlns:R="http://www.riverfrontsoftware.com/">
  <D:set>
          <D:prop>
                  <R:webdrivemodtime>Here is my property
value</R:webdrivemodtime>
          </D:prop>
     </D:set>
  </D:propertyupdate>

Of course, you could choose any URL for the namespace, and any prefix
character that was unique within the message.

- Jim