Bug 451565

Summary: Akonadi does not honor HTTP 301 DAV urls
Product: [Frameworks and Libraries] Akonadi Reporter: Franck Routier (alci) <alci>
Component: DAV ResourceAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: alci
Priority: NOR    
Version: 5.19.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Franck Routier (alci) 2022-03-16 11:08:20 UTC
SUMMARY

Trying to add CalDAV / CArdDAV resources from SOGo server, akonadi fails to retrieve collections, and complains about lack of authentication

STEPS TO REPRODUCE
1. Add an Address Book
2. akonadi_davgroupware assistant pops up and asks for credentials
3. asks for server name and computes the full URLs (notice ther last part is missing, ie personal/ is my case, name of my address book)
4. when clicking OK, a popup appears and complains that the web site does not require authentication, warning for a possible trap, and asks for confirmation
5. after confirmation, nothing happens... looking at akonadiconsole, the resources shows "Extracting collections (0%"

OBSERVED RESULT
No usable resources (address book or calendar) is added.
Evolution and Android DAVx5 work fine with server.
Going to the url with a browser asks for authentication.

EXPECTED RESULT
Add and synchronize address book(s) and calendar(s) available on the SOGo server

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 22.04 / KDE Plasma 5.24.3
(available in About System)
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0 
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Franck Routier (alci) 2022-03-16 21:37:58 UTC
I found the origin of the problem: the resource URLs have moved and the server is redirecting (301) to a new URL.
Evolution as well as DAVx5 cope with this, but akonadi does not. Using the current url (and not the redirected one) works...