Skip to content

Commit

Permalink
Use HTTPS as a default scheme
Browse files Browse the repository at this point in the history
HTTP was a good default some time ago. But now most of the websites are moving to HTTPS and also modern browsers like Chrome, Firefox, Edge, Opera, etc. are defaulting urls without scheme to HTTPS (e.g. "//example.com" will get defaulted to "https://example.com"). So I think it makes more sense now to use HTTPS instead HTTP as a default.
  • Loading branch information
DominikSerafin committed Oct 23, 2017
1 parent d027911 commit a0d11ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion url_normalize/url_normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def url_normalize(url, charset='utf-8'):
"""
# if there is no scheme use http as default scheme
if url[0] not in ['/', '-'] and ':' not in url[:7]:
url = 'http://' + url
url = 'https://' + url

# shebang urls support
url = url.replace('#!', '?_escaped_fragment_=')
Expand Down

0 comments on commit a0d11ed

Please sign in to comment.