Skip to content
Browse files

Support https connections

  • Loading branch information...
1 parent 3be3e99 commit 8d89717715ed6eabb21564e44453329ba118b37b @CFSworks CFSworks committed Nov 3, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 minerutil/RPCProtocol.py
View
9 minerutil/RPCProtocol.py
@@ -43,9 +43,12 @@ def doRequest(self, *args):
def _doRequest(self, url, *args):
if self.connection is None:
- self.connection = httplib.HTTPConnection(url.hostname,
- url.port or 80,
- timeout=self.timeout)
+ connectionClass = (httplib.HTTPSConnection
+ if url.scheme.lower() == 'https' else
+ httplib.HTTPConnection)
+ self.connection = connectionClass(url.hostname,
+ url.port,
+ timeout=self.timeout)
self.connection.connect()
self.connection.sock.setsockopt(socket.SOL_TCP,
socket.TCP_NODELAY, 1)

0 comments on commit 8d89717

Please sign in to comment.
Something went wrong with that request. Please try again.