[Bug 5426] New: wget hangs in call to poll() if progress meter or timeout support is enabled and HTTP chunked encoding is used

bugzilla at busybox.net bugzilla at busybox.net
Thu Aug 2 08:33:38 UTC 2012


https://bugs.busybox.net/show_bug.cgi?id=5426

           Summary: wget hangs in call to poll() if progress meter or
                    timeout support is enabled and HTTP chunked encoding
                    is used
           Product: Busybox
           Version: 1.19.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Networking
        AssignedTo: unassigned at busybox.net
        ReportedBy: knnthsrnsn at gmail.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


Analysis:
When Busybox wget is compiled with CONFIG_FEATURE_WGET_STATUSBAR and
CONFIG_FEATURE_WGET_TIMEOUT enabled it uses poll() and non-blocking fread() to
retrieve data. If the HTTP server uses HTTP/1.1 chunked encoding wget further
more uses fgets() to retrieve the content of the next chunk.

With this combination wget reads chunk length (and all remaining data) with
fgets() and afterwards hangs forever in the poll() on an empty socket.

Suggested solution:
Make sure that all data is retrieved with fread() before using poll() to wait
for further data.

Workaround:
Disable CONFIG_FEATURE_WGET_STATUSBAR and CONFIG_FEATURE_WGET_TIMEOUT

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list