Skip to content

Commit

Permalink
Send accept-encoding: identity to get correct content-length on head …
Browse files Browse the repository at this point in the history
…requests
  • Loading branch information
mvdbeek committed Apr 25, 2024
1 parent 9eb6a8e commit 31c1a01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulsar/client/transport/curl.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def post_file(url, path):


def get_size(url) -> int:
response = requests.head(url)
response = requests.head(url, headers={"accept-encoding": "identity"})
if response.status_code >= 299:
log.warning("Response to HEAD request for '%s' with status code %s, cannot resume download", url, response.status_code)
return -1
Expand Down

0 comments on commit 31c1a01

Please sign in to comment.