Skip to content

Commit

Permalink
Fix Port issue - #24
Browse files Browse the repository at this point in the history
  • Loading branch information
Cx01N committed Dec 5, 2019
1 parent dbaae9c commit 6fe381b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/common/listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ def set_listener_option(self, listenerName, option, value):
listenerObject.options[option]['Value'] = value
# Check if Port is set and add it to host
parts = listenerObject.options['Host']['Value']
if parts.startswith('http'):
address = parts[7:]
address = ''.join(address.split(':')[0])
protocol = "http"
listenerObject.options['Host']['Value'] = "%s://%s:%s" % (protocol, address, listenerObject.options['Port']['Value'])
elif parts.startswith('https'):
if parts.startswith('https'):
address = parts[8:]
address = ''.join(address.split(':')[0])
protocol = "https"
listenerObject.options['Host']['Value'] = "%s://%s:%s" % (protocol, address, listenerObject.options['Port']['Value'])
elif parts.startswith('http'):
address = parts[7:]
address = ''.join(address.split(':')[0])
protocol = "http"
listenerObject.options['Host']['Value'] = "%s://%s:%s" % (protocol, address, listenerObject.options['Port']['Value'])
return True

elif option == 'StagingKey':
Expand Down

0 comments on commit 6fe381b

Please sign in to comment.