Skip to content

Commit 3d796d8

Browse files
author
Marek Miller
committed
Use port 443 as default for https RPC connections
Also remove unnecessary FIXME comment (fixed by 28518d2).
1 parent 2f2e0f2 commit 3d796d8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

bitcoin/rpc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def __init__(self, rpc_error):
5555

5656

5757
class RawProxy(object):
58-
# FIXME: need a CChainParams rather than hard-coded service_port
5958
def __init__(self, service_url=None,
6059
service_port=None,
6160
btc_conf_file=None,
@@ -108,7 +107,10 @@ def __init__(self, service_url=None,
108107
self.__service_url = service_url
109108
self.__url = urlparse.urlparse(service_url)
110109
if self.__url.port is None:
111-
port = 80
110+
if self.__url.scheme == 'https':
111+
port = httplib.HTTPS_PORT
112+
else:
113+
port = httplib.HTTP_PORT
112114
else:
113115
port = self.__url.port
114116
self.__id_count = 0

0 commit comments

Comments
 (0)