diff options
author | kali <kali@leap.se> | 2012-11-09 11:21:40 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-11-09 11:21:40 +0900 |
commit | 8118056a244ca74d16380ad26a70e3da40e7e401 (patch) | |
tree | 4363948d180a667a545807b99b2d3199e30b5950 /src/leap/util | |
parent | b84007d8fec8c949ba4ac1d26695c710a210d797 (diff) |
connect page merged into regvalidation.
Flow nearly working with fake provider, except for authentication.
Diffstat (limited to 'src/leap/util')
-rw-r--r-- | src/leap/util/web.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/leap/util/web.py b/src/leap/util/web.py new file mode 100644 index 00000000..6ddf4b21 --- /dev/null +++ b/src/leap/util/web.py @@ -0,0 +1,18 @@ +""" +web related utilities +""" + + +def get_https_domain_and_port(full_domain): + """ + returns a tuple with domain and port + from a full_domain string that can + contain a colon + """ + domain_split = full_domain.split(':') + _len = len(domain_split) + if _len == 1: + domain, port = full_domain, 443 + if _len == 2: + domain, port = domain_split + return domain, port |