Agree, that could have been better. The attached patch adds HTTP 1.1 and
chunked encoding support. It also cleans up and improves the header
processing and adds comments to explain the logic. This also fixes a bug in
the original implementations header processing where it was assumed that
the first read would contain the complete headers.

- Eric

On Wed, Oct 27, 2021 at 4:30 AM Rob Landley <r...@landley.net> wrote:

> On 10/26/21 9:05 AM, Eric Molitor wrote:
> > Attached is an initial cleanup of wget. This addresses a number of
> defects with
> > the existing implementation and generally cleans up the code. I've
> squashed the
> > commits but can provide a more incremental set of patches if desired. I
> have two
> > more pending changes which correctly add HTTP 1.1 support, including
> support for
> > chunked encoding, as well as adding TLS support. However this was
> already a huge
> > change so working on landing this first before submitting the others
> changes.
>
> Applied, but I'm not sure this moves it _closer_ to getting out of pending:
>
> +#define WGET_FILENAME "Content-Disposition: attachment; filename="
> ...
> +  f = wget_strncaseafter(toybuf, WGET_FILENAME, body - toybuf);
>
> What does splitting a string a hundred lines away from its only user
> accomplish?
>
> Rob
>

Attachment: 0001-wget-Cleanup-and-add-support-for-HTTP-1.1-and-chunke.patch
Description: Binary data

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to