Skip to content

Commit

Permalink
Merge pull request #361 from mvdbeek/fix_resume
Browse files Browse the repository at this point in the history
Send accept-encoding: identity to get correct content-length on head …
  • Loading branch information
mvdbeek authored Apr 27, 2024
2 parents 9eb6a8e + 31c1a01 commit 973f7b3
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 973f7b3

Please sign in to comment.