-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-81403: Fix for CacheFTPHandler in urllib #13951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
Every change to Python requires a NEWS entry. Please, add it using the blurb_it Web app or the blurb command-line tool. |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
This change looks good to me. This fell out of attention due to lack of news and I cannot edit this PR. I will merge this and make a minor change and NEWS as a separate PR commit. The NEWS entry I will add is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Maybe it's worth copying the issue text? Like:
|
@arhadthedev - sounds good to me. |
It seems automerge was ignored. |
Thanks @hemberger for the PR, and @orsenthil for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
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. (cherry picked from commit e38bebb) Co-authored-by: Dan Hemberger <[email protected]> Co-authored-by: Senthil Kumaran <[email protected]>
GH-103705 is a backport of this pull request to the 3.11 branch. |
* gh-81403: Fix for CacheFTPHandler in urllib (GH-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. (cherry picked from commit e38bebb) Co-authored-by: Dan Hemberger <[email protected]> Co-authored-by: Senthil Kumaran <[email protected]> * Added NEWS entry. --------- Co-authored-by: Dan Hemberger <[email protected]> Co-authored-by: Senthil Kumaran <[email protected]>
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.
https://bugs.python.org/issue37222