File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ def test_iter(self):
112112 for line in self .returned_obj .__iter__ ():
113113 self .assertEqual (line , self .text )
114114
115-
116115class ProxyTests (unittest .TestCase ):
117116
118117 def setUp (self ):
@@ -866,6 +865,11 @@ def open_spam(self, url):
866865 self .assertEqual (DummyURLopener ().open (
867866 'spam://example/ /' ),'//example/%20/' )
868867
868+ # test the safe characters are not quoted by urlopen
869+ self .assertEqual (DummyURLopener ().open (
870+ "spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/" ),
871+ "//c:|windows%/:=&?~#+!$,;'@()*[]|/path/" )
872+
869873# Just commented them out.
870874# Can't really tell why keep failing in windows and sparc.
871875# Everywhere else they work ok, but on those machines, someteimes
Original file line number Diff line number Diff line change @@ -1426,7 +1426,7 @@ def addheader(self, *args):
14261426 def open (self , fullurl , data = None ):
14271427 """Use URLopener().open(file) instead of open(file, 'r')."""
14281428 fullurl = unwrap (to_bytes (fullurl ))
1429- fullurl = quote (fullurl , safe = "%/:=&?~#+!$,;'@()*[]" )
1429+ fullurl = quote (fullurl , safe = "%/:=&?~#+!$,;'@()*[]| " )
14301430 if self .tempcache and fullurl in self .tempcache :
14311431 filename , headers = self .tempcache [fullurl ]
14321432 fp = open (filename , 'rb' )
You can’t perform that action at this time.
0 commit comments