From e1c2e1b5d82bdc993115e42637eb86dfa54c4814 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Fri, 19 Aug 2016 20:03:29 +0200 Subject: [PATCH] Fix bug in URL normalization --- vdirsyncer/storage/dav.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index 136fa81..f36e3f1 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -19,8 +19,15 @@ dav_logger = logging.getLogger(__name__) CALDAV_DT_FORMAT = '%Y%m%dT%H%M%SZ' -_path_reserved_chars = frozenset(utils.compat.urlquote(x, '') - for x in "/?#[]!$&'()*+,;=") + +def _generate_path_reserved_chars(): + for x in "/?#[]!$&'()*+,;=": + x = utils.compat.urlquote(x, '') + yield x.upper() + yield x.lower() + +_path_reserved_chars = frozenset(_generate_path_reserved_chars()) +del _generate_path_reserved_chars def _contains_quoted_reserved_chars(x):