From 603b1d8f57ba23546b8e445027fd570fad263333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 7 Jan 2016 21:47:30 +0100 Subject: [PATCH] Normalize HTTP header names to title case The spec says they are case insensitive, so this is just for consistency (with eg. Chrome). --- pyicloud/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyicloud/base.py b/pyicloud/base.py index 1b03a22..f7e43c4 100644 --- a/pyicloud/base.py +++ b/pyicloud/base.py @@ -60,9 +60,9 @@ class PyiCloudService(object): self.session = requests.Session() self.session.verify = verify self.session.headers.update({ - 'host': 'setup.icloud.com', - 'origin': self._home_endpoint, - 'referer': '%s/' % self._home_endpoint, + 'Host': 'setup.icloud.com', + 'Origin': self._home_endpoint, + 'Referer': '%s/' % self._home_endpoint, 'User-Agent': 'Opera/9.52 (X11; Linux i686; U; en)' })