Skip to content

Commit

Permalink
Fix curlify (#2828)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin authored Feb 3, 2025
1 parent 59d241e commit 4afa45e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/huggingface_hub/utils/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,10 @@ def _curlify(request: requests.PreparedRequest) -> str:
if request.body:
body = request.body
if isinstance(body, bytes):
body = body.decode("utf-8")
body = body.decode("utf-8", errors="ignore")
if len(body) > 1000:
body = body[:1000] + " ... [truncated]"
parts += [("-d", body)]
parts += [("-d", body.replace("\n", ""))]

parts += [(None, request.url)]

Expand Down

0 comments on commit 4afa45e

Please sign in to comment.