Bug 9591 - 1.26.2 wget doesn't fetch the whole file
Summary: 1.26.2 wget doesn't fetch the whole file
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: unspecified
Hardware: Other Linux
: P5 blocker
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-13 13:47 UTC by Béla Márkus
Modified: 2017-01-16 16:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Config file (28.23 KB, application/xml)
2017-01-15 15:21 UTC, Béla Márkus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Béla Márkus 2017-01-13 13:47:33 UTC
BusyBox 1.26.2 wget retrieves files partially with http:// 1.25.1 and 1.24.2 works as expected.

Built on Raspberry Pi3 in piCore Linux.
Comment 1 Denys Vlasenko 2017-01-13 21:14:10 UTC
Can you be more specific.
Which URL it does not download?
Does the same config work on x86?
Please attach your .config.
Please attach tcpdump of the good (old version) and bad wget runs.
Comment 2 Béla Márkus 2017-01-15 15:21:11 UTC
Created attachment 6856 [details]
Config file
Comment 3 Béla Márkus 2017-01-15 15:22:53 UTC
http://repo.tinycorelinux.net/8.x/armv7/tcz/md5.db.gz

Didn't try on x86
Comment 4 Denys Vlasenko 2017-01-16 16:26:36 UTC
It's caused by this:

                /* If we use SSL helper, keeping our end of the socket open for writing
                 * makes our end (i.e. the same fd!) readable (EAGAIN instead of EOF)
                 * even after child closes its copy of the fd.
                 * This helps:
                 */
                shutdown(fileno(sfp), SHUT_WR);

Evidently, nginx is startled to find that we are not going to write anything to the connection. It stops sending data and closes the connection too soon.

commit a6f8651911716d1d1624712eb19e4f3608767c7e which fixes this will be backported to 1.26.x

Thanks.