mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-17 02:51:07 +00:00
accept unicode domain names according to RFC3490 (IDNA)
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1903 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
78a7af2dbf
commit
ad78277935
1 changed files with 5 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ import sets
|
|||
import sys
|
||||
import os
|
||||
import time
|
||||
import encodings.idna
|
||||
|
||||
import linkcheck.dns.exception
|
||||
import linkcheck.dns.message
|
||||
|
|
@ -517,6 +518,10 @@ class Resolver(object):
|
|||
|
||||
if isinstance(qname, str):
|
||||
qname = linkcheck.dns.name.from_text(qname, None)
|
||||
elif isinstance(qname, unicode):
|
||||
# Unicode domain names: http://www.faqs.org/rfcs/rfc3490.html
|
||||
qname = encodings.idna.ToASCII(qname)
|
||||
qname = linkcheck.dns.name.from_text(qname, None)
|
||||
if isinstance(rdtype, str):
|
||||
rdtype = linkcheck.dns.rdatatype.from_text(rdtype)
|
||||
if isinstance(rdclass, str):
|
||||
|
|
|
|||
Loading…
Reference in a new issue