cpython/Lib/urllib
Dan Hemberger e38bebb9ee
gh-81403: Fix for CacheFTPHandler in urllib (#13951)
bpo-37222: Fix for CacheFTPHandler in urllib

A call to FTP.ntransfercmd must be followed by FTP.voidresp to clear
the "end transfer" message. Without this, the client and server get
out of sync, which will result in an error if the FTP instance is
reused to open a second URL. This scenario occurs for even the most
basic usage of CacheFTPHandler.

Reverts the patch merged as a resolution to bpo-16270 and adds a test
case for the CacheFTPHandler in test_urllib2net.py.

Co-authored-by: Senthil Kumaran <senthil@python.org>
2023-04-22 21:41:23 -07:00
..
__init__.py
error.py gh-101936: Update the default value of fp from io.StringIO to io.BytesIO (gh-102100) 2023-02-22 00:14:41 +09:00
parse.py gh-88500: Reduce memory use of `urllib.unquote` (#96763) 2022-12-10 16:17:39 -08:00
request.py gh-81403: Fix for CacheFTPHandler in urllib (#13951) 2023-04-22 21:41:23 -07:00
response.py bpo-12707: deprecate info(), geturl(), getcode() methods in favor of headers, url, and status properties for HTTPResponse and addinfourl (GH-11447) 2019-09-13 12:40:07 +01:00
robotparser.py bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or request rate (GH-11791) 2019-06-16 09:48:57 +03:00