projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9ecbac
)
Open the correct type of HTTP Connection based on the scheme being used.
author
Josh Roesslein
<jroesslein@gmail.com>
Sun, 10 Oct 2010 04:06:28 +0000
(23:06 -0500)
committer
Josh Roesslein
<jroesslein@gmail.com>
Sun, 10 Oct 2010 04:06:28 +0000
(23:06 -0500)
tweepy/streaming.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/streaming.py
b/tweepy/streaming.py
index d757f20bac7ba203e01419fb0edc4be4f3cdebc9..8b35b8e7d979e44439d8e71ffc05408a54beb193 100644
(file)
--- a/
tweepy/streaming.py
+++ b/
tweepy/streaming.py
@@
-99,7
+99,10
@@
class Stream(object):
# quit if error count greater than retry count
break
try:
- conn = httplib.HTTPConnection(self.host)
+ if self.scheme == "http":
+ conn = httplib.HTTPConnection(self.host)
+ else:
+ conn = httplib.HTTPSConnection(self.host)
conn.connect()
conn.sock.settimeout(self.timeout)
conn.request('POST', self.url, self.body, headers=self.headers)