go-webdav/internal
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
..
client.go client: support redirects in PropfindFlat() 2022-05-31 16:05:54 +02:00
elements_test.go internal: use http.TimeFormat to marshal Time values 2021-03-16 18:42:55 +01:00
elements.go internal: don't send an empty error element 2022-05-02 20:41:33 +02:00
internal.go Replace DAVError with HTTPError + Error 2022-05-02 15:43:43 +02:00
server.go Replace DAVError with HTTPError + Error 2022-05-02 15:43:43 +02:00
xml_test.go internal: add RawXMLValue to defer XML encoding/decoding 2020-01-14 17:54:03 +01:00
xml.go internal: add NewPropfindResponse helper 2020-01-17 14:40:29 +01:00