From 8e45bf98db50a2f32379f29dd5c1e0c0452df3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sat, 12 Mar 2016 14:46:23 +0100 Subject: [PATCH] Don't set host header in reminders service It's automatically taken care of by the requests module based on the URL, and explicitly setting it on the globally shared session object results in other services (such as the calendar service) breaking when used after the reminders service in the same session. --- pyicloud/services/reminders.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pyicloud/services/reminders.py b/pyicloud/services/reminders.py index 9bbc7d3..ae26204 100644 --- a/pyicloud/services/reminders.py +++ b/pyicloud/services/reminders.py @@ -49,9 +49,6 @@ class RemindersService(object): return self.get_all_possible_timezones_of_local_machine()[0] def refresh(self): - host = self._service_root.split('//')[1].split(':')[0] - self.session.headers.update({'host': host}) - params_reminders = dict(self.params) params_reminders.update({ 'clientVersion': '4.0', @@ -107,9 +104,6 @@ class RemindersService(object): if collection in self.collections: pguid = self.collections[collection]['guid'] - host = self._service_root.split('//')[1].split(':')[0] - self.session.headers.update({'host': host}) - params_reminders = dict(self.params) params_reminders.update({ 'clientVersion': '4.0',