andig / carddav2fb

Download CardDAV VCards and upload as phonebook to AVM FRITZ!Box
63 stars 19 forks source link

Switch from REPORT to PROPFIND #188

Closed develth closed 4 years ago

develth commented 4 years ago

Hi

i found out that the sync didn´t worked for me anymore since the switch from PROPFIND to REPORT.

Maybe we could easily switch back to PROPFIND with the following Setup:

PROPFIND $url

<d:propfind xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav">
  <d:prop>
     <c:address-data />
     <d:getetag />
  </d:prop>
</d:propfind>

The Result looks good:

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:a="urn:ietf:params:xml:ns:carddav" xmlns:D="DAV:">
    <D:response>
        <D:href>/SOGo/dav/mail@mail.de/Contacts/B1-5E170780-1-10AF9A80/B1-5E170780-3-10AF9A80.vcf</D:href>
        <D:propstat>
            <D:status>HTTP/1.1 200 OK</D:status>
            <D:prop>
                <a:address-data>BEGIN:VCARD
UID:B1-5E170780-3-10AF9A80.vcf
VERSION:3.0
CLASS:PUBLIC
PROFILE:VCARD
N:Test;Propfind
NICKNAME:Nick
FN:The Label Name
ORG:Supercorp
TEL;TYPE=home:100000001
END:VCARD</a:address-data>
                <D:getetag>&quot;gcs00000000&quot;</D:getetag>
            </D:prop>
        </D:propstat>
    </D:response>
</D:multistatus>

Could you please check if it works with your Servers, too?

Server PROPFIND RESULT
SOGo

Thanks & best regards Thomas

andig commented 4 years ago

Could you please add a tracking table here or in the PR:

Will PROPFIND still retrieve the entire result set in a single run instead of individual requests?

develth commented 4 years ago

Will PROPFIND still retrieve the entire result set in a single run instead of individual requests?

Yes, it is included!

develth commented 4 years ago

Table is included in original Comment

develth commented 4 years ago

What Servers do you use? Then i could go for testing.

andig commented 4 years ago

Let us please restructure the problem:

So how to we proceed? I feel it's either:

Does that make any sense? Opinions?

andig commented 4 years ago

@develth does REPORT work for your with filter as in https://github.com/andig/carddav2fb/issues/167#issuecomment-575091400?

develth commented 4 years ago

@andig nope and it just returns a (seems like) cached result. Regardless what i change inside it returns the same result

andig commented 4 years ago

@develth Any chance to work around on the HTTP client side, e.g. no-cache, must-revalidate? Could be a proxy and not your carddav server that is the problem?

update Could you also cross-check https://tools.ietf.org/html/rfc6352#section-6.1.1 and see what your server actually supports? Does it return REPORT as supported?

develth commented 4 years ago

Nothing worked, its a issue with REPORT

develth commented 4 years ago
Allow:   GET, HEAD, POST, OPTIONS, MKCOL, MKCALENDAR, DELETE, PUT, LOCK, UNLOCK, COPY, MOVE, REPORT, PROPFIND, SEARCH
Dav:     1, 2, access-control, addressbook
andig commented 4 years ago

It might make sense to support both REPORT and PROPFIND. Added a PR to allow that, fttb need to modify the code, will add config setting later if this works.

matzesa commented 4 years ago

Sounds good. I had problems with iCloud (500 Internal Server Error) and carddav2fb (Version 15.11.2018) so I updated yesterday. iCloud is working but now I have problems with Synology DiskStation (CardDav Server 6.0.9-0087; Workaround: https://github.com/andig/carddav2fb/issues/167#issuecomment-575091400).

andig commented 4 years ago

Workaround: https://github.com/andig/carddav2fb/issues/167#issuecomment-575091400

That won't get merged. The Synology software is so severely broken in this case that it should be fixed. Opening an upstream ticket should help with that ;)