mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Issue #14132: Fix redirect handling when target is just a query string
This commit is contained in:
parent
f95455da4c
commit
ce6e06874b
4 changed files with 25 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
"""Regresssion tests for urllib"""
|
||||
"""Regresssion tests for what was in Python 2's "urllib" module"""
|
||||
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
@ -86,10 +86,11 @@ def fakehttp(fakedata):
|
|||
|
||||
# buffer to store data for verification in urlopen tests.
|
||||
buf = None
|
||||
fakesock = FakeSocket(fakedata)
|
||||
|
||||
def connect(self):
|
||||
self.sock = self.fakesock
|
||||
self.sock = FakeSocket(self.fakedata)
|
||||
type(self).fakesock = self.sock
|
||||
FakeHTTPConnection.fakedata = fakedata
|
||||
|
||||
return FakeHTTPConnection
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue