-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
fix bug 65667 #478
fix bug 65667 #478
Conversation
(ext/session/tests/session_set_save_handler_class_005.phpt which failed the build also fails without my patch) |
Yeah, the test suite is not 100% stable on travis yet. |
Looks like a regression |
So, the test suite doesn't fail now and I suspect it won't fail after merging your PR :) i.e. proof is missing. |
fails to download the whole file because ftp_nb_get's implementation closes the stream too early
the idea behind ftp_nb_get is for it to be followed by multiple calls to ftp_nb_continue in order to download a file piece-by-piece. As such, it's unwise to close the stream used to write the downloaded data to when the file hasn't been completely downloaded within the first call to ftp_nb_get. This regression was added in a93a462 and this patch restores the behavior that was seen pre-patch.
ok. I've added a testcase now. I've rebased the commits such that the failing test case comes before the commit which fixes the bug. Aside of that, let me switch into rant-mode for a second: Here's what I've done for this bug:
After doing all that instead of a thank you and maybe even a merge of the PR, the thing I get is a complaint about a missing test. Yeah. I understand you'd like to see a testcase, but just consider what all went wrong to cause this bug:
As such, I would say that this commit should not have passed review, but yet it did. On the other hand, my little fix which unbreaks the, now completely broken Come on. Anyways. Rant over. As somebody using |
Congrats, you've done a great job. Though, you could have reviewed at least 3 other bugs while writing this rant. The "Thank you" usually comes from a template when the bug is closed, but maybe we can get github to post a "Thank you" when requesting a pull? |
Comment on behalf of nikic at php.net: Merged in 96cc419. |
@nikic no worries. Thank you so much for applying this and sorry for my rant - I guess I had a bad day today :( |
@pilif As long as you keep providing patches, you're welcome to rant (: |
If only my C was better - then you'd get plenty of them. Until then I'll have to constrain myself to the low-hanging fruits :-) |
This PR is a fix for bug 65667
the idea behind ftp_nb_get is for it to be followed by multiple calls
to ftp_nb_continue in order to download a file piece-by-piece.
As such, it's unwise to close the stream used to write the downloaded
data to when the file hasn't been completely downloaded within the first
call to ftp_nb_get.
This regression was added in a93a462
and this patch restores the behavior that was seen pre-patch.