You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Correctly handle single-byte Content-Range (#1032)
HTTPie previously failed if it continued a download with a single byte left.
This commit is contained in:
@@ -81,7 +81,7 @@ def parse_content_range(content_range: str, resumed_from: int) -> int:
|
||||
# last-byte-pos value, is invalid. The recipient of an invalid
|
||||
# byte-content-range- spec MUST ignore it and any content
|
||||
# transferred along with it."
|
||||
if (first_byte_pos >= last_byte_pos
|
||||
if (first_byte_pos > last_byte_pos
|
||||
or (instance_length is not None
|
||||
and instance_length <= last_byte_pos)):
|
||||
raise ContentRangeError(
|
||||
|
Reference in New Issue
Block a user