![Quote](images/misc/quote_icon.png)
Originally Posted by
camel
I a
- Trying to create rsync like functionality on top of webdav
- Trying to use the entity tags as a way to see if a file has changed?
Simplest way:
Ignore the entity tag, and only use the last modified date (compare the one from the webdav with the one locally, taking into account the different times of the computers).
Harder way:
Store the entity tag of a file together with the lastmodified time of the file(when you knew that the file was identical to the one on the server) and a md5/sha1 sum of the file....;-)
Bandswitsch !! get the file to check md5 ?? or save md5 key on server && local??
The last mod time is never same as local file.... time from incomming Put http Method... (upload time stay as lastmod time)
I test .... i upload a file called: qt4.2compile.txt (ubuntu fetschi package build)
upload to webdav .....
http://ppk.ciz.ch/qt_c++/qt4.2compile.txt
http://ppk.ciz.ch/qt_c++/ dir list time ...
first upload original file Last mod time 20 Feb 2007 18:41:11
qt4.2compile.txt
Propfind http method say .... on first upload ... (last mod is now incomming time & created time...)
<D:response xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/" xmlns:lp2="http://apache.org/dav/props/">
<D:href>/webdav/qt_c++/qt4.2compile.txt</D:href>
<D:propstat>
<D:prop>
<lp1:resourcetype/>
<lp1:creationdate>2007-02-20T18:41:57Z</lp1:creationdate>
<lp1:getcontentlength>239</lp1:getcontentlength>
<lp1:getlastmodified>Tue, 20 Feb 2007 18:41:57 GMT</lp1:getlastmodified>
<lp1:getetag>"bc4d3-ef-cbea6740"</lp1:getetag>
<lp2:executable>F</lp2:executable>
<D:supportedlock>
<D:response xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/" xmlns:lp2="http://apache.org/dav/props/">
<D:href>/webdav/qt_c++/qt4.2compile.txt</D:href>
<D:propstat>
<D:prop>
<lp1:resourcetype/>
<lp1:creationdate>2007-02-20T18:41:57Z</lp1:creationdate>
<lp1:getcontentlength>239</lp1:getcontentlength>
<lp1:getlastmodified>Tue, 20 Feb 2007 18:41:57 GMT</lp1:getlastmodified>
<lp1:getetag>"bc4d3-ef-cbea6740"</lp1:getetag>
<lp2:executable>F</lp2:executable>
<D:supportedlock>
To copy to clipboard, switch view to plain text mode
Same file Whithoud chance reupload....
the same file drag to upload ..... original file Last mod time 20 Feb 2007 18:41:11
dir list apache2 say 20-Feb-2007 19:46 239 GMT + 1 correct...
Propfind http method say
<D:response xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/" xmlns:lp2="http://apache.org/dav/props/">
<D:href>/webdav/qt_c++/qt4.2compile.txt</D:href>
<D:propstat>
<D:prop>
<lp1:resourcetype/>
<lp1:creationdate>2007-02-20T18:46:04Z</lp1:creationdate>
<lp1:getcontentlength>239</lp1:getcontentlength>
<lp1:getlastmodified>Tue, 20 Feb 2007 18:46:04 GMT</lp1:getlastmodified>
<lp1:getetag>"bc4d3-ef-daa35300"</lp1:getetag>
<lp2:executable>F</lp2:executable>
<D:supportedlock>
<D:response xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/" xmlns:lp2="http://apache.org/dav/props/">
<D:href>/webdav/qt_c++/qt4.2compile.txt</D:href>
<D:propstat>
<D:prop>
<lp1:resourcetype/>
<lp1:creationdate>2007-02-20T18:46:04Z</lp1:creationdate>
<lp1:getcontentlength>239</lp1:getcontentlength>
<lp1:getlastmodified>Tue, 20 Feb 2007 18:46:04 GMT</lp1:getlastmodified>
<lp1:getetag>"bc4d3-ef-daa35300"</lp1:getetag>
<lp2:executable>F</lp2:executable>
<D:supportedlock>
To copy to clipboard, switch view to plain text mode
if i download the file <lp1:getetag>"bc4d3-ef-daa35300"</lp1:getetag> stay same...
Also only this <lp1:getetag> have a working info to check if a remote is newer or the local file....
Subversion software versioning working on the same way .... why? svn is on top on a webdav server and dir.... propfind http method.... i check code from esvn wo is qt based....
Bookmarks