Skip to content

Show an error for incomplete downloads #254

Open
@ducaale

Description

@ducaale

This is how HTTPie 3.1.1.dev0 handles incomplete downloads:

http -d httpbin.org/gzip
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Encoding: gzip
Content-Length: 224
Content-Type: application/json
Date: Sat, 14 May 2022 12:04:33 GMT
Server: gunicorn/19.9.0

Downloading to gzip.json
Done. 284 bytes in 00:0.18373 (1.5 kB/s)  # "Done" becomes "Interrupted" when there is an actual error

http: error: Incomplete download: size=224; downloaded=284

This can be a little bit tricky when resuming an interrupted download via --continue or when dealing with compressed responses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions