]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[utils] Add rationale for register_socks_protocols
authorYen Chi Hsuan <yan12125@gmail.com>
Tue, 3 May 2016 07:37:30 +0000 (15:37 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 10 May 2016 06:51:38 +0000 (14:51 +0800)
youtube_dl/utils.py

index c9702fd93f59862fa5bb261f38b5f7ccb6977116..dc73f34079360e4d1411dccd938ef42a53c51208 100644 (file)
@@ -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)