Skip to content

Commit 841803f

Browse files
committed
Merge pull request #31 from rasky/master
Issue #28: Add support for HTTPS connections to the backend
2 parents 76906c5 + ecf2cc3 commit 841803f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pusher/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
app_id_re = re.compile('^[0-9]+$')
2020

2121
def url2options(url):
22-
assert url.startswith('http://'), "invalid URL"
23-
url = url[7:]
22+
if url.startswith('http://'):
23+
url = url[7:]
24+
elif url.startswith('https://'):
25+
url = url[8:]
26+
else:
27+
assert False, "invalid URL"
2428
key, url = url.split(':', 1)
2529
secret, url = url.split('@', 1)
2630
host, url = url.split('/', 1)

0 commit comments

Comments
 (0)