Simon Ser
790ebfc5f8
webdav: rename MoveAll to Move
2024-01-18 13:28:50 +01:00
Simon Ser
4493704689
webdav: introduce CopyOptions
2024-01-18 13:28:50 +01:00
Simon Ser
b043bbd965
internal/server: handle PROPFIND without body
...
See RFC 4918 section 9.1.
2024-01-08 14:58:24 +01:00
Simon Ser
75d3041b41
webdav: rename Client.Readdir to ReadDir
...
This is a more idiomatic name, and we've broken the API already
to add the ctx argument.
2024-01-08 14:35:56 +01:00
Simon Ser
751741d87e
webdav: add/improve doc comments
2024-01-08 14:35:19 +01:00
Simon Ser
7e076258d6
caldav: add DiscoverContextURL
2023-12-27 23:16:49 +01:00
Simon Ser
174622c1eb
carddav: rename Discover to DiscoverContextURL
...
This only performs part of the discovery process.
2023-12-27 23:11:51 +01:00
Simon Ser
d033e09835
webdav: add context to FileSystem
2023-12-19 21:29:54 +01:00
Simon Ser
379a418130
Add context for clients
2023-12-19 21:29:37 +01:00
Simon Ser
0e58dbb003
caldav, carddav: take header when populating object
...
References: https://github.com/emersion/go-webdav/pull/134
2023-12-18 18:18:56 +01:00
Simon Ser
dddaf279ed
Upgrade dependencies
2023-09-10 14:52:02 +09:00
Simon Ser
fc4ea1aae2
caldav, carddav: drop unnecessary nil check
...
Closes: https://github.com/emersion/go-webdav/issues/92
2023-08-25 13:35:33 +02:00
Simon Ser and GitHub
b46cbafa6f
readme: switch back to pkg.go.dev for docs
2023-08-15 08:29:01 +02:00
Simon Ser
0fb0a675ab
carddav: handle PROPFIND on root
...
Same as 7dd64908d2 ("caldav: handle PROPFIND on root") but for
CardDAV.
2023-07-06 12:14:17 +02:00
Simon Ser
150f74a6f0
Add GitHub issue template
2023-01-04 11:00:51 +01:00
Simon Ser
987c9eef0b
carddav: use "/.well-known/carddav/" as initial context path in Discover
...
See RFC 6764 section 6 item 3.
2022-07-13 08:43:40 +02:00
Simon Ser
d7891ce50c
internal: fix XML element struct naming
...
We were sometimes using TitleCase, sometimes Lowercase. Let's align
on the idiomatic Go naming and pick TitleCase everywhere.
2022-05-31 23:04:42 +02:00
Simon Ser
55a9274ba6
internal: use Namespace instead of "DAV:"
2022-05-31 17:10:30 +02:00
Simon Ser
1c71a7a1c4
internal: add more context to Response.DecodeProp errors
2022-05-31 17:04:44 +02:00
Simon Ser
d0fc22a428
internal: use errors.As in IsNotFound
...
Allows it to work properly with wrapped errors.
2022-05-31 16:58:45 +02:00
Simon Ser
9bc7a8f15b
internal: drop Multistatus.Get
...
This is now unused.
2022-05-31 16:11:08 +02:00
Simon Ser
06ecb0e64c
webdav: add TODO about fallback in Client.FindCurrentUserPrincipal
2022-05-25 15:07:20 +02:00
Simon Ser
97e0b10b4f
carddav: add Discover TODO about "path" key in TXT record
2022-05-25 14:57:05 +02:00
Simon Ser
9ed4abce57
caldav: add Content-Length support to client
...
Follow-up for https://github.com/emersion/go-webdav/pull/83 .
2022-05-24 10:47:40 +02:00
Simon Ser
38a35d3545
carddav: improve Client.SyncCollection docs
2022-05-24 10:20:08 +02:00
Simon Ser
bc3faca3a0
carddav: only call CurrentUserPrincipal when necessary
2022-05-13 15:29:55 +02:00
Simon Ser
a346d42f42
caldav: only call CurrentUserPrincipal when necessary
2022-05-13 15:29:55 +02:00
Simon Ser
346cfadd34
webdav: rename ServeUserPrincipal to ServePrincipal
...
A principal may represent something else than a user, for instance
it may represent a group.
Also rename UserPrincipalPath to CurrentUserPrincipalPath, because
the principal being served may not represent the current user.
2022-05-12 18:44:43 +02:00
Simon Ser
d8a8af0448
internal: don't send an empty error element
...
According to RFC 4918 section 14.5, the error element can't be empty.
2022-05-02 20:41:33 +02:00
Simon Ser
3f8b212b0d
internal: add Response.Err
...
Builds a detailed HTTPError + Error if the Response is a failure.
It contains more context than just the HTTPError.
2022-05-02 15:43:43 +02:00
Simon Ser
8cc6542f1c
carddav: use partial error response on multiget failure
...
Instead of making the whole HTTP request fail when a single address
object cannot be fetched, return a partial error response.
2022-05-02 15:43:43 +02:00
Simon Ser
46ebe58ac2
internal: introduce NewErrorResponse
...
Same as NewOKResponse but for errors.
2022-05-02 15:43:43 +02:00
Simon Ser
4e8c5effe3
Replace DAVError with HTTPError + Error
...
That way we can avoid having different ways of representing the
same error value.
2022-05-02 15:43:43 +02:00
Simon Ser
8738a105fc
internal: add HTTPError.Unwrap
...
This allows callers to access the underlying error via errors.Unwrap.
2022-05-02 15:43:43 +02:00
Simon Ser and Conrad Hoffmann
106d4e1c88
caldav: add basic server
...
A lot of features a still missing, but basic discovery works.
Co-authored-by: Conrad Hoffmann <ch@bitfehler.net >
2022-03-16 16:47:29 +01:00
Simon Ser and Conrad Hoffmann
9caa4ff356
caldav: add support for reports
...
Co-authored-by: Conrad Hoffmann <ch@bitfehler.net >
2022-03-16 16:47:29 +01:00
Simon Ser
2162596af8
readme: update badges
2022-02-02 13:54:40 +01:00
Simon Ser
373663f9ee
readme: add CI badge
2020-10-12 17:35:10 +02:00
Simon Ser
25df841e2b
internal: move HTTPError to common file
...
This is used by both clients and servers now.
2020-05-13 18:24:29 +02:00
Simon Ser
a4e0e81003
caldav: add Client.MultiGetCalendar
2020-05-13 16:45:25 +02:00
Simon Ser
5328b4c493
caldav: set Depth to 1 for calendar-query REPORT requests
...
SabreDAV chokes on an unset Depth header field.
2020-05-13 15:06:16 +02:00
Simon Ser
4c0dc5d900
internal: parse WebDAV toplevel <error> elements
2020-05-13 15:02:52 +02:00
Simon Ser
f4e3fe8c0a
internal: add Multistatus.Get test with HTTP error
...
References: https://github.com/emersion/go-webdav/issues/39
2020-04-05 14:37:17 +02:00
Simon Ser
66d5686c9e
ci: add .build.yml
2020-04-02 16:50:41 +02:00
Simon Ser
abadf534f4
carddav: expose supported address data in client
2020-02-27 12:36:14 +01:00
Simon Ser
514296664c
caldav: upgrade to latest go-ical API
2020-02-24 21:16:45 +01:00
Simon Ser
4c419a961d
caldav: add Client.GetCalendarObject
2020-02-24 18:19:39 +01:00
Simon Ser
7bb9b3aa0b
caldav: add Client.PutCalendarObject
2020-02-24 18:13:24 +01:00
Simon Ser
07d4dfae5e
Use new ical library
2020-02-24 17:52:25 +01:00
Simon Ser
7d2b6a3902
carddav: make Discover fail when target is empty
2020-02-19 16:32:35 +01:00
Simon Ser
4b24edf624
carddav: fix Discover with default HTTPS port
2020-02-19 16:31:03 +01:00
Simon Ser
ddf2a85958
Introduce HTTPClient, remove Client.SetBasicAuth
2020-02-19 16:02:49 +01:00
Simon Ser
c52097fefb
carddav: add Client.GetAddressObject
2020-02-12 21:38:55 +01:00
Simon Ser
236dc07837
carddav: fix Client.PutAddressObject failing with Radicale
...
This is workaround for a Radicale issue.
References: https://github.com/Kozea/Radicale/issues/1016
2020-02-12 21:10:52 +01:00
Simon Ser
a81a7014c6
internal: remove outdated TODO
2020-02-12 20:06:06 +01:00
Simon Ser
7d0d522fa7
internal: prevent empty endpoint path from resulting in "." sub-paths
2020-02-12 20:04:31 +01:00
Simon Ser
842acb3647
carddav: add Client.PutAddressObject
2020-02-12 19:47:16 +01:00
Simon Ser
30eac28d2b
internal: read response body on error
2020-02-12 19:46:05 +01:00
Simon Ser
a892cc58df
internal: only handle relative paths in Client.ResolveHref
...
Don't prepend the endpoint path in front of absolute paths.
2020-02-12 17:13:12 +01:00
Simon Ser
0b2d0a706c
internal: accomodate for trailign slashes in Multistatus.Get
2020-02-12 17:12:21 +01:00
Simon Ser
7f285fdf83
internal: fix Client.PropfindFlat when endpoint has a non-empty path
2020-02-12 16:40:30 +01:00
Simon Ser
9afa59dc22
internal: fix trailing slash getting removed in Client.ResolveHref
2020-02-12 16:40:03 +01:00
Simon Ser
1d93353e3d
caldav: add prop-filter support to client
2020-02-05 18:38:46 +01:00
Simon Ser
baf63fb1b7
caldav: parse iCal data
2020-02-05 18:05:48 +01:00
Simon Ser
4eb8396edb
caldav: add support for time filters in client
2020-02-05 17:36:18 +01:00
Simon Ser
57df6bf316
caldav: add filter XML definition
2020-02-05 17:07:35 +01:00
Simon Ser
f9d728aaeb
carddav: add Client.HasSupport
2020-02-05 16:08:15 +01:00
Simon Ser
3ea3818dd8
internal: fix Status text marshaling
2020-02-03 21:54:55 +01:00
Simon Ser
69d8cf54ff
internal: fix ETag.String returning unquoted string
2020-02-03 21:52:15 +01:00
Simon Ser
25678476db
internal: add ETag
2020-02-03 21:48:31 +01:00
Simon Ser
ca51e9427a
caldav: add Client.QueryCalendar
2020-02-03 17:26:55 +01:00
Simon Ser
dd1527b97e
carddav: allow created address book objects to have a different path
...
Closes: https://github.com/emersion/go-webdav/issues/32
2020-01-30 15:20:10 +01:00
Simon Ser
2e5aa7653b
readme: add CalDAV
2020-01-30 15:11:12 +01:00
Simon Ser
6df8d2d892
caldav: add part of calendar-query XML element
2020-01-30 15:07:04 +01:00
Simon Ser
bae7dcce43
caldav: add Client.FindCalendars
2020-01-30 13:51:02 +01:00
Simon Ser
936b9451cc
caldav: add some calendar XML elements
2020-01-30 13:31:42 +01:00
Simon Ser
6aea0eda2d
caldav: add Client boilerplate
2020-01-30 13:18:05 +01:00
Simon Ser
feea39c898
carddav: fix server appearing as read-only in Evolution
2020-01-30 00:43:23 +01:00
Simon Ser
8937358ac1
Allow servers to return DAV capabilities in OPTIONS
2020-01-29 18:03:47 +01:00
Simon Ser
5f03e421d3
carddav: fix addressbook-home-set>href namespace
2020-01-29 17:41:28 +01:00
Simon Ser
1f509de404
carddav: honor address-data in addressbook-query
2020-01-27 10:30:19 +01:00
Simon Ser
29cccc7ef9
carddav: add query filter support in server
...
Closes: https://github.com/emersion/go-webdav/issues/18
2020-01-24 16:34:57 +01:00
Simon Ser
73b67b62b1
carddav: add client support for query filter
...
References: https://github.com/emersion/go-webdav/issues/18
2020-01-24 12:24:35 +01:00
Simon Ser
5ada08f6ab
carddav: add full query AST
2020-01-24 11:25:58 +01:00
Simon Ser
e56ab47c43
carddav: add negateCondition
2020-01-23 19:32:10 +01:00
Simon Ser
30977aac83
carddav: add matchType
2020-01-23 19:27:31 +01:00
Simon Ser
38b729ad9c
carddav: remove filter.MarshalText
...
This isn't necessary, we can just straight up let encoding/xml use the
string.
2020-01-23 19:21:00 +01:00
Simon Ser
94f47fa001
carddav: add limit support to addressbook-query
...
References: https://github.com/emersion/go-webdav/issues/18
2020-01-23 10:35:14 +01:00
Simon Ser
70c3bffdf3
carddav: add filter and limit XML definitions
2020-01-22 20:36:35 +01:00
Simon Ser
cd5945aace
carddav: add AddressBook{Query,MultiGet}.AllProp
2020-01-22 19:18:58 +01:00
Simon Ser
7e29f37bd8
carddav: add allprop and propname support to query and multiget in server
2020-01-22 18:59:01 +01:00
Simon Ser
0a251a8dfb
carddav: add AddressObject.{ModTime,ETag}
2020-01-22 15:35:36 +01:00
Simon Ser
2eb6e89979
carddav: add DELETE support to server
2020-01-22 15:16:41 +01:00
Simon Ser
aa750836d4
carddav: add PUT support to server
2020-01-22 15:14:49 +01:00
Simon Ser
bf97060e19
carddav: don't support PROPPATCH
...
PROPPATCH can't be used to change an address object's data. For now,
let's not support it.
2020-01-22 14:52:14 +01:00
Simon Ser
6de76c94b8
internal: check for HTTP errors in Client.Do
...
Closes: https://github.com/emersion/go-webdav/issues/19
2020-01-22 13:22:45 +01:00
Simon Ser
59ad6f4d76
cmd/webdav-server: new command
2020-01-22 13:17:52 +01:00
Simon Ser
6d229f4e8a
webdav: add COPY support to server
2020-01-22 13:00:42 +01:00
Simon Ser
fda38c8f93
webdav: add recursive arg to Client.Readdir
2020-01-22 12:06:36 +01:00
Simon Ser
f04c1c9421
webdav: add support for ETag to client & server
2020-01-22 12:03:58 +01:00