Commit 6a1e170b authored by Robin Houston's avatar Robin Houston
Browse files

Apply the auth before connecting, otherwise it will fail on reconnection

when using OAuth (because the nonce has been used before, and the timestamp
is no longer correct).
parent a722e487
......@@ -89,7 +89,6 @@ class Stream(object):
def _run(self):
# Authenticate
url = "%s://%s%s" % (self.scheme,, self.url)
self.auth.apply_auth(url, 'POST', self.headers, self.parameters)
# Connect and process the stream
error_counter = 0
......@@ -104,6 +103,7 @@ class Stream(object):
conn = httplib.HTTPConnection(
conn = httplib.HTTPSConnection(
self.auth.apply_auth(url, 'POST', self.headers, self.parameters)
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