Server: Upgrade from 10.0.2 to 11.0.0 breaks carddav and caldav URIs

Created on 13 Dec 2016  路  11Comments  路  Source: nextcloud/server

After a upgrade from 10.0.2 the URIs of /caldav and /carddav changed to /dav which breaks older clients. And I had to do some rewrites on my machine:

Nginx config:

   if ($request_uri ~ /nextcloud/remote\.php/caldav/calendars/(.*)$  ) {
            set $request_url /nextcloud/remote.php/dav/calendars/$1;
    }
    if ($request_uri ~ /nextcloud/remote\.php/carddav/addressbooks/(.*)$) {
            set $request_url /nextcloud/remote.php/dav/addressbooks/$1;
    }

Expected behaviour

When a client requests:
https://cloud.org/nextcloud/remote.php/caldav/calendars/(user)/defaultcalendar

It should get the answers as before the upgrade.

Actual behaviour

Client gets a 404 because real URI changed to https://cloud.org/nextcloud/remote.php/dav/calendars/(user)/defaultcalendar

Same for carddav

Server configuration

Operating system:
CentOS release 6.8 (Final)

Web server:
nginx version: nginx/1.10.2

Database:
mysql Ver 14.14 Distrib 5.5.52, for Linux (x86_64) using readline 5.1

PHP version:
5.6.28
Nextcloud version: (see Nextcloud admin page)
11.0.0
Updated from an older Nextcloud/ownCloud or fresh install:
Update from 10.0.2 to 11.0.0

0. Needs triage bug dav

All 11 comments

cc @rullzer

Sorry but can you share with the rest of the class where and what you edited to make it work?
Thank you!

I put the rewrites in the nginx config.

I can't make it work with your workaround. I even tried to tweak it for my config, but still no success.
I guess I'll wait for something more official and see where that goes. Shame I can't use my contacts because of this now

@rullzer Told me he takes a quick look. Roeland, if you have no time or disagree feel free to reassign :)

location / {
    # The following 2 rules are only needed with webfinger
    rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
    rewrite ^/.well-known/carddav /remote.php/dav/ redirect;
    #rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
    #rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
    rewrite ^/.well-known/caldav /remote.php/dav/ redirect;
    rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
    try_files $uri $uri/ /index.php;
}

I nailed it for my config :)

I can't make it work with your workaround. I even tried to tweak it for my config, but still no success.
I guess I'll wait for something more official and see where that goes. Shame I can't use my contacts because of this now

Well it might have some specials for my nginx configuration. Like the variables request_uri and request_url which might be named otherwise in yours.

2653 should (tm) fix the issue. Please have a look.

2653 applied on top of normal 11.0.0 doesn't fix the issue for me (so unless there is something else that has sideeffects in one of the other commits, I'd consider it still unfixed).

The tests now run also against the old endpoint and pass. If somebody encounters other issues please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juliushaertl picture juliushaertl  路  3Comments

mama21mama picture mama21mama  路  3Comments

jancborchardt picture jancborchardt  路  3Comments

blackcrack picture blackcrack  路  3Comments

MorrisJobke picture MorrisJobke  路  3Comments