Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ In alphabetical order:
- Christian Geier
- Clément Mondon
- Corey Hinshaw
- Euxane TRAN-GIRARD
- Kai Herlemann
- Hugo Osvaldo Barrera
- Jason Cox
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Version 0.19.3
- Require matching ``BEGIN`` and ``END`` lines in vobjects. :gh:`1103`
- A Docker environment for Vdirsyncer has been added `Vdirsyncer DOCKERIZED <https://github.com/Bleala/Vdirsyncer-DOCKERIZED>`_.
- Implement digest auth. :gh:`1137`
- Expose ``ignore_uids`` config parameter for :storage:`http`, :gh:`1135`

Version 0.19.2
==============
Expand Down
17 changes: 9 additions & 8 deletions docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,14 +484,7 @@ leads to an error.
[storage holidays_remote]
type = "http"
url = https://example.com/holidays_from_hicksville.ics

Too many WebCAL providers generate UIDs of all ``VEVENT``-components
on-the-fly, i.e. all UIDs change every time the calendar is downloaded.
This leads many synchronization programs to believe that all events have
been deleted and new ones created, and accordingly causes a lot of
unnecessary uploads and deletions on the other side. Vdirsyncer completely
ignores UIDs coming from :storage:`http` and will replace them with a hash
of the normalized item content.
#ignore_uids = true

:param url: URL to the ``.ics`` file.
:param username: Username for authentication.
Expand All @@ -508,3 +501,11 @@ leads to an error.
:param auth_cert: Optional. Either a path to a certificate with a client
certificate and the key or a list of paths to the files with them.
:param useragent: Default ``vdirsyncer``.
:param ignore_uids: Ignore UIDs coming from :storage:`http` and replace
them with a hash of the normalized item content.
Too many WebCAL providers generate UIDs of all ``VEVENT``-components
on-the-fly, i.e. all UIDs change every time the calendar is downloaded.
This leads many synchronization programs to believe that all events
have been deleted and new ones created, and accordingly causes a lot of
unnecessary uploads and deletions on the other side.
Default: ``true``.
7 changes: 5 additions & 2 deletions tests/storage/test_http_with_singlefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ def __init__(self, url, path, *, connector, **kwargs):
super().__init__(**kwargs)
self.url = url
self.path = path
self._reader = vdirsyncer.storage.http.HttpStorage(url=url, connector=connector)
self._reader._ignore_uids = False
self._reader = vdirsyncer.storage.http.HttpStorage(
url=url,
connector=connector,
ignore_uids=False,
)
self._writer = SingleFileStorage(path=path)

async def list(self, *a, **kw):
Expand Down
2 changes: 2 additions & 0 deletions vdirsyncer/storage/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def __init__(
verify=None,
auth=None,
useragent=USERAGENT,
ignore_uids=True,
verify_fingerprint=None,
auth_cert=None,
*,
Expand All @@ -54,6 +55,7 @@ def __init__(

self.username, self.password = username, password
self.useragent = useragent
self._ignore_uids = ignore_uids
assert connector is not None
self.connector = connector

Expand Down