Skip to content

Commit

Permalink
Merge pull request #1444 from dandi/rewind
Browse files Browse the repository at this point in the history
Rewind filehandle request bodies before retrying requests
  • Loading branch information
yarikoptic committed May 23, 2024
2 parents 722f1b6 + 1910e8a commit d9abf1d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dandi/dandiapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ def request(
url,
result.text,
)
if data is not None and hasattr(data, "seek"):
data.seek(0)
result.raise_for_status()
except Exception as e:
if isinstance(e, requests.HTTPError):
Expand Down

0 comments on commit d9abf1d

Please sign in to comment.