Commit 64c504ec authored by Josh Roesslein's avatar Josh Roesslein
Browse files

Open the correct type of HTTP Connection based on the scheme being used.

parent f9ecbac6
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment