-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--download
reports an "incomplete download" with Content-Encoding: gzip and content-length.
#423
Comments
Yeah, I could validate it here... I'll try to fix it |
I think that fix is still vulnerable to a problem where the gzip content is incompletely downloaded, but still expands to greater than the content-length. I don't have a demonstration handy, though. |
hmm yeah, it could still be trouble... I'll try a better fix |
To me, it seems like |
Greetings from 2023.
|
I think the output should be the decompressed output as it is now. It is just the warning that should go away. If the raw download matches what the http header said, all is good. Make raw an opt-in for those cases when you really do not want the raw content encoding to be downloaded as-is. I think this issue should focus on getting rid of the error message by measuring the right thing. |
When using HTTPie to download a file which is both gzip'd and has a content-length header sent, the final output report says that the download is incomplete. This is apparently because HTTPie tracks the number of bytes it wrote, not the number of bytes it received.
Here is an example, which reproduces in HTTPie head as of about 10 minutes ago.
Note that
size
is the value ofContent-length
, butdownloaded
is greater thansize
because of the gzip encoding.The text was updated successfully, but these errors were encountered: