Skip to content
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

Don't retry requests with CURLOPT_NOBODY except for HTTP retries #1243

Closed
wants to merge 1 commit into from

Conversation

Marwes
Copy link

@Marwes Marwes commented Feb 3, 2017

This reverts commit 31e33a9.

Using sftp to delete a file with CURLOPT_NOBODY set with a reused connection would fail as curl expected to get some data. Thus it would retry the command again which fails as the file has already been deleted.

This issue had originally been fixed in 12f5c67 which I found out about from https://curl.haxx.se/mail/lib-2006-02/0029.html. However the fix got removed in 31e33a9. A straight revert as this PR does currently is perhaps not sufficient as there should at least be a comment explaining the reason for the !data->set.opt_no_body check (should it perhaps only be for FTP to not interfere with HTTP as mentioned in 31e33a9?) so I'd be happy to amend this PR with a better fix.

@mention-bot
Copy link

@Marwes, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bagder, @dfandrich and @yangtse to be potential reviewers.

@jay jay added the SCP/SFTP label Feb 3, 2017
@bagder
Copy link
Member

bagder commented Feb 4, 2017

I think we probably should make that rule (no_body && !using-HTTP) so that it gets retried for the HTTP case, but not for other protocols.

@Marwes Marwes force-pushed the fix_sftp_reused_connection_rm branch 2 times, most recently from a28ef97 to 5fa8cb8 Compare February 4, 2017 13:17
@Marwes
Copy link
Author

Marwes commented Feb 4, 2017

Ok, I think I got that and the explanation correct now but feel free to change it.

@Marwes Marwes force-pushed the fix_sftp_reused_connection_rm branch from 5fa8cb8 to 71a32a5 Compare February 4, 2017 15:02
Using sftp to delete a file with CURLOPT_NOBODY set with a reused connection would fail as curl expected to get some data. Thus it would retry the command again which fails as the file has already been deleted.
@Marwes Marwes force-pushed the fix_sftp_reused_connection_rm branch from 71a32a5 to 59ad111 Compare February 6, 2017 09:09
@Marwes Marwes changed the title Revert "HTTP: retry failed HEAD requests too" Don't retry requests with CURLOPT_NOBODY except for HTTP retries Feb 6, 2017
@bagder bagder self-assigned this Feb 7, 2017
@bagder bagder closed this in 6ffe0f5 Feb 7, 2017
@bagder
Copy link
Member

bagder commented Feb 7, 2017

thanks!

@Marwes Marwes deleted the fix_sftp_reused_connection_rm branch February 7, 2017 09:29
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

None yet

4 participants