You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import idna
>>> idna.encode('r6---sn-i5onxoxu-cxgl.c.doc-0-0-sj.sj.googleusercontent.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/idna/core.py", line 355, in encode
result.append(alabel(label))
File "/usr/local/lib/python2.7/dist-packages/idna/core.py", line 276, in alabel
check_label(label)
File "/usr/local/lib/python2.7/dist-packages/idna/core.py", line 239, in check_label
check_hyphen_ok(label)
File "/usr/local/lib/python2.7/dist-packages/idna/core.py", line 134, in check_hyphen_ok
raise IDNAError('Label has disallowed hyphens in 3rd and 4th position')
idna.core.IDNAError: Label has disallowed hyphens in 3rd and 4th position
Same issue for decoding. The hostname is valid, so it should just pass without error.
I came here because requests unconditionally does idna encoding of the hostname.
The text was updated successfully, but these errors were encountered:
Consider the following
Same issue for decoding. The hostname is valid, so it should just pass without error.
I came here because requests unconditionally does idna encoding of the hostname.
The text was updated successfully, but these errors were encountered: