Again /.well-known/caldav and a solution (.htaccess)

I also getting always warning about caldav/carddav
After updating to 20, I thought this should be solved now.
I checked again everything and found nothing.

I also looked at:

And found again:
RewriteRule ^.well-known/carddav /nextcloud/remote.php/dav [R=301,L]
RewriteRule ^.well-known/caldav /nextcloud/remote.php/dav [R=301,L]

At the end I jumped into the code to find the ‘error’.
I found that the expected answer is 207 and not 301:


checkWellKnownUrl: function(url, placeholderUrl, runCheck, expectedStatus) {
if (expectedStatus === undefined) {
expectedStatus = [207];

Since in the call of the check is no expectedStatus parameter, it uses the default 207.

After I corrected my .htaccess to

RewriteRule ^.well-known/carddav /nextcloud/remote.php/dav [R=207,L]
RewriteRule ^.well-known/caldav /nextcloud/remote.php/dav [R=207,L]

It worked.

I don’t know where the ‘bug’ is.
Documentation web page or code.
But since the code of 20.7 should be fine, I think the documentation is wrong.

It looks that in older nc versions 301 was the correct answer and this was changed.
My .htaccess file was never modified by me. We used nc from version 11 onwards.