Bug 362885

Summary: deleting addressbook entry does not work (CardDAV DELETE adds trailing / to URL)
Product: [Frameworks and Libraries] Akonadi Reporter: Robert Schöftner <rmu>
Component: DAV ResourceAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kdenis
Priority: NOR    
Version: 5.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Robert Schöftner 2016-05-10 11:52:21 UTC
on the DAV-Server (DAViCAL), instead of something like this

[...] "PUT /caldav.php/robert/addresses/C551BDC5-7970-0001-C3CE-18FFD8B01109.vcf HTTP/1.1" 204 483 "-" "Mozilla/5.0 (X11; Linux x86_64) KHTML/5.18.0 (like Gecko) Konqueror/5.18"
[...] "GET /caldav.php/robert/addresses/C551BDC5-7970-0001-C3CE-18FFD8B01109.vcf HTTP/1.1" 200 763 "-" "KDE DAV groupware client"

I see

[...] "DELETE /caldav.php/robert/addresses/C54E938B-93A0-0001-D2F5-1D10CB201908.vcf/ HTTP/1.1" 404 440 "-" "Mozilla/5.0 (X11; Linux x86_64) KHTML/5.18.0 (like Gecko) Konqueror/5.18"
[...] "DELETE /caldav.php/robert/addresses/C54E938B-93A0-0001-D2F5-1D10CB201908.vcf/ HTTP/1.1" 404 439 "-" "Mozilla/5.0 (X11; Linux x86_64) KHTML/5.18.0 (like Gecko) Konqueror/5.18"

note the trailing / after vcf.

After this, the groupware resource goes into some weird offline mode and can't be restarted.

Reproducible: Always

Steps to Reproduce:
1. delete contact.
Comment 1 Robert Schöftner 2016-06-23 09:29:16 UTC
The same problem exists with caldav-calendars.
Comment 2 Robert Schöftner 2016-06-23 09:30:43 UTC
After further investigation, I found out that this happens when there is non-empty ~/.config/akonadi/agent_config_akonadi_davgroupware_resource_XX_changes.dat

In case it is relevant, I am using postgresql as database backend.
Comment 3 Robert Schöftner 2016-06-23 10:53:41 UTC
Workaround in apache / davical: enable rewrite module and include something like this

  RewriteEngine On
  RewriteRule ^(.*\.[iv]cs)/$   $1      [L,PT]

in your <VirtualHost> definition. This removes a trailing / from URLs ending in .ics/ and .vcs/.

Proper fix would be to find out why in some cases a / is appended to the URL.
Comment 4 Denis Kurz 2016-08-19 08:10:47 UTC
This is a duplicate of bug 355441, see bug 355441, comment 5
Comment 5 Christophe Marin 2016-08-20 09:06:28 UTC

*** This bug has been marked as a duplicate of bug 355441 ***