mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-18 11:31:06 +00:00
Make scheme and domain for internal url pattern case insensitive.
This commit is contained in:
parent
b089b04a79
commit
7b567cc378
1 changed files with 2 additions and 2 deletions
|
|
@ -26,8 +26,8 @@ def get_intern_pattern (url):
|
||||||
"""Return intern pattern for given URL. Redirections to the same
|
"""Return intern pattern for given URL. Redirections to the same
|
||||||
domain with or without "www." prepended are allowed."""
|
domain with or without "www." prepended are allowed."""
|
||||||
parts = strformat.url_unicode_split(url)
|
parts = strformat.url_unicode_split(url)
|
||||||
scheme = parts[0]
|
scheme = parts[0].lower()
|
||||||
domain = parts[1]
|
domain = parts[1].lower()
|
||||||
domain, is_idn = urlutil.idna_encode(domain)
|
domain, is_idn = urlutil.idna_encode(domain)
|
||||||
# allow redirection www.example.com -> example.com and vice versa
|
# allow redirection www.example.com -> example.com and vice versa
|
||||||
if domain.startswith('www.'):
|
if domain.startswith('www.'):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue