Handle connection being closed unexpectedly mid download #96

Closed
hickford opened this Issue Oct 8, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

hickford commented Oct 8, 2012

If the HTTP connection is closed part way through the response, wget will bork

$ wget http://download.sysinternals.com/files/SysinternalsSuite.zip
Length: 13080395 (12M) [application/x-zip-compressed]
Saving to: `SysinternalsSuite.zip.1'

99% [=====================================> ] 13,066,240  4.90K/s   in 37s

2012-10-08 11:31:28 (345 KB/s) - Connection closed at byte 13066240. Retrying.

Wget will retry the download. My browsers silently accept the truncated download. Httpie too silently accepts the truncated download. I don't know whether httpie should retry, but I think httpie should at least warn that the response is incomplete.

NB. The truncation of that particular request only happens in my dodgy network so you will need your own example to test this behaviour.

Owner

jakubroztocil commented Nov 10, 2012

I'm considering adding a --download mode which would make HTTPie behave similarly to wget (progress bar, resume, etc).

Related: #97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment