Conrad Hoffmann 03633121d9 client: support redirects in PropfindFlat()
One common method for CalDAV or CardDAV clients to find the current user
principal URL is to request the `/.well-known` URL (see [RFC 6764,
section 6][1]), expecting a redirect. Such URL is for example a valid
result of the discovery phase described in that RFC. The expectation is
that a client, given such URL, is able to find the principal URL by
following a redirect when sending a PROPFIND request.

This change makes `PropfindFlat()` (and, by extension,
`FindCurrentUserPrincipal()`) handle such a redirect and correctly
return the requested properties, even if their HREF is different from
the original request path.

[1]: https://datatracker.ietf.org/doc/html/rfc6764#section-6
2022-05-31 16:05:54 +02:00
2020-04-02 16:50:41 +02:00
2017-08-26 14:46:44 +02:00
2020-01-22 13:00:42 +01:00
2020-02-24 21:16:45 +01:00
2020-02-24 21:16:45 +01:00
2020-01-14 17:51:33 +01:00
2022-02-02 13:54:40 +01:00

go-webdav

godocs.io builds.sr.ht status

A Go library for WebDAV, CalDAV and CardDAV.

License

MIT

Description
A Go library for WebDAV, CalDAV and CardDAV
Readme MIT 612 KiB
Languages
Go 100%