Skip to content

Commit

Permalink
handle bytesIO correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasht86 committed Nov 21, 2024
1 parent 80aa44a commit 03410b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vespa/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,9 +1316,8 @@ def _request_with_api_key(
else:
if hasattr(body, "seek"):
body.seek(0)
content = body.read()
digest.update(content)
body_data = content
digest.update(body.read())
body_data = body
# Create signature
content_hash = standard_b64encode(digest.finalize()).decode("UTF-8")
timestamp = datetime.utcnow().isoformat() + "Z"
Expand Down

0 comments on commit 03410b0

Please sign in to comment.