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

Add seek(0) to request data to prevent issues on retries #624

Merged

Conversation

Metamess
Copy link
Contributor

Closes #621

Credits go to @martindurant for the code.

When a simple_upload request fails but the data BytesIO stream was fully consumed, the retry attempt may fail because it does not send any data in the retried request. This PR attempt to fix that by always performing a seek(0) before starting the request.

@martindurant martindurant merged commit 1c68cd8 into fsspec:main May 23, 2024
5 checks passed
@rabernat
Copy link
Contributor

Thanks for this fix @Metamess! We have hit the same bug! 🙏

@martindurant would be wonderful to get a release asap. 🙏

@martindurant
Copy link
Member

Ping me next week

@rabernat
Copy link
Contributor

rabernat commented Jun 3, 2024

Ping for a release! 🙏

Thanks for your work Martin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid multipart request on retry
3 participants