소스 검색

[utils] Add rationale for register_socks_protocols

Yen Chi Hsuan 9 년 전
부모
커밋
d5ae6bb501
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      youtube_dl/utils.py

+ 2 - 0
youtube_dl/utils.py

@@ -63,6 +63,8 @@ from .socks import (
 
 def register_socks_protocols():
     # "Register" SOCKS protocols
+    # In Python < 2.6.5, urlsplit() suffers from bug https://bugs.python.org/issue7904
+    # URLs with protocols not in urlparse.uses_netloc are not handled correctly
     for scheme in ('socks', 'socks4', 'socks4a', 'socks5'):
         if scheme not in compat_urlparse.uses_netloc:
             compat_urlparse.uses_netloc.append(scheme)