wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wget-dev] wget2 | Unimplemented option '--ignore-length' (#439)


From: Tim Rühsen
Subject: Re: [Wget-dev] wget2 | Unimplemented option '--ignore-length' (#439)
Date: Wed, 23 Oct 2019 09:05:58 +0000



Tim Rühsen commented:


First of all, when `Content-Length:` is missing there is no `Transfer-Encoding: 
chunked`, we only can say that the body has been transferred when the 
connection remotely closes. At least that's the best guess (the connection 
could have been closed prematurely).

That means with `--ignore-length` we can only request one file per connection 
(on HTTP/1, we have to check what about HTTP/2).

> However, when I set Content-Length to 0, I get this error:

I would expect to see `Body too large: 81 instead of 0 bytes`. I think libwget 
currently doesn't distinguish between `Content-Length: 0` and no Content-Length 
at all. But that would be another error, you should possibly fix first.

>From the issue message I would think of Content-Length saying X, but the 
>actual body just has less than X bytes. If you download two files in one 
>connection, the second header is likely to be misread.

So maybe create a test with two files and create a wrong Content-Length for the 
first one. Something should go badly wrong... and --ignore-length should fix it.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/issues/439#note_234338517
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]