After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704740 - WebDAV - Do not store ETag into REV attribute
WebDAV - Do not store ETag into REV attribute
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
3.10.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2013-07-23 12:08 UTC by Alban Browaeys
Modified: 2013-09-21 13:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds patch (8.93 KB, patch)
2013-07-23 14:12 UTC, Milan Crha
committed Details | Review

Description Alban Browaeys 2013-07-23 12:08:20 UTC
ETag is opaque alphanumeric sent by the server to the client, then sent back to the server on PUT (modify a contact).
REV is a timestamp per specification (thans mcrha: "the spec really says it's supposed to be a timespamp, not any other data type: http://tools.ietf.org/html/rfc6350#section-6.7.4" ).
And davical expect so to the point it store REV as modified field in the database tables, set as TIMESTAMP type ... thus when it gets REV as a non timestamp by gnome-contacts or other evolution data server users, it breaks and no changes are lost in translation.

My investigations at that point, shows that ETag needs to be stored in some way by evolution data server , for the session only. Ie if we store it in the vcard via any other field, and the server upgrade change the generation of the ETag (davical does an md5 of the raw vcard but other might use another calculus), then we would loose sync.
But we need to store it in some way: I am looking at soup session, or if a session object in evolution data server itself we could use it. ETag is just like light cookies .
Comment 1 Milan Crha 2013-07-23 12:38:04 UTC
Confirming, the WebDAV backend stores the ETag into REV field.
Comment 2 Milan Crha 2013-07-23 14:12:38 UTC
Created attachment 249892 [details] [review]
eds patch

for evolution-data-server;

Do not store ETag into REV in WebDAV. If you can, please give it a try, as I cannot fully test it (against DAViCal), but I see on my server that the REV is left as is and the backend uses the new attribute, thus it should work fine for DAViCal as well.
Comment 3 Alban Browaeys 2013-07-24 12:27:07 UTC
Works very well. Thanks ! I tested via gnome-contacts (jhbuild of gnome 3.9) to davical 1.1.1 (debian). The test was to change the fullname of an existing contact.
Comment 4 Milan Crha 2013-07-25 06:08:54 UTC
Thanks for the testing.

Created commit 198bcea in eds master (3.9.5+)
Created commit 749de2b in eds gnome-3-8 (3.8.5+)