Skip to content

Commit 608a541

Browse files
committed
downgrading the path handling problem error to a warning + a hack for GMX needed some update
1 parent d423bd6 commit 608a541

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

caldav/compatibility_hints.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,6 @@
555555
"no_search_openended",
556556
"no_sync_token",
557557
"no_scheduling_calendar_user_address_set",
558-
"rate_limited",
559-
#"broken_expand_on_exceptions", ## should be implied by no_expand?
560558
]
561559

562560
# fmt: on

caldav/davobject.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ def _query(
216216
body = to_wire(body)
217217
if (
218218
ret.status == 500
219-
and b"getetag" not in body
220-
and b"<C:calendar-data/>" in body
219+
and b"D:getetag" not in body
220+
and b"<C:calendar-data" in body
221221
):
222222
body = body.replace(
223-
b"<C:calendar-data/>", b"<D:getetag/><C:calendar-data/>"
223+
b"<C:calendar-data", b"<D:getetag/><C:calendar-data"
224224
)
225225
return self._query(
226226
body, depth, query_method, url, expected_return_value
@@ -298,7 +298,7 @@ def get_properties(
298298
## ... but it gets worse ... when doing a propfind on the
299299
## principal, the href returned may be without the slash.
300300
## Such inconsistency is clearly a bug.
301-
log.error(
301+
log.warning(
302302
"potential path handling problem with ending slashes. Path given: %s, path found: %s. %s"
303303
% (path, exchange_path, error.ERR_FRAGMENT)
304304
)
@@ -323,15 +323,15 @@ def get_properties(
323323
## Ref https://github.com/python-caldav/caldav/issues/191 ...
324324
## let's be pragmatic and just accept whatever the server is
325325
## throwing at us. But we'll log an error anyway.
326-
log.error(
326+
log.warning(
327327
"Possibly the server has a path handling problem, possibly the URL configured is wrong.\n"
328328
"Path expected: %s, path found: %s %s.\n"
329329
"Continuing, probably everything will be fine"
330330
% (path, str(list(properties)), error.ERR_FRAGMENT)
331331
)
332332
rc = list(properties.values())[0]
333333
else:
334-
log.error(
334+
log.warning(
335335
"Possibly the server has a path handling problem. Path expected: %s, paths found: %s %s"
336336
% (path, str(list(properties)), error.ERR_FRAGMENT)
337337
)

caldav/lib/error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def assert_(condition: object) -> None:
6262
raise
6363

6464

65-
ERR_FRAGMENT: str = "Please consider raising an issue at https://github.com/python-caldav/caldav/issues or reach out to t-caldav@tobixen.no, include this error and the traceback and tell what server you are using"
65+
ERR_FRAGMENT: str = "Please consider raising an issue at https://github.com/python-caldav/caldav/issues or reach out to t-caldav@tobixen.no, include this error and the traceback (if any) and tell what server you are using"
6666

6767

6868
class DAVError(Exception):

0 commit comments

Comments
 (0)