[Bug 9471] wget doesn't work on my system (http)

bugzilla at busybox.net bugzilla at busybox.net
Wed Jan 11 19:09:08 UTC 2017


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

--- Comment #4 from Denys Vlasenko <vda.linux at googlemail.com> ---
(In reply to 4mlinux from comment #3)
This is what happens:

20:03:03.976590 write(2, "Connecting to ", 14) = 14
20:03:03.976804 write(2, "4mlinux.com", 11) = 11
20:03:03.976953 write(2, " (", 2)       = 2
20:03:03.977106 write(2, "104.28.8.32:80", 14) = 14
20:03:03.977201 write(2, ")\n", 2)      = 2
20:03:03.977282 alarm(900)              = 0
20:03:03.977353 socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3
20:03:03.977439 connect(3, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("104.28.8.32")}, 16) = 0
20:03:03.982732 fcntl(3, F_GETFL)       = 0x2 (flags O_RDWR)
20:03:03.982829 ioctl(3, TCGETS, 0xffdd354c) = -1 ENOTTY (Inappropriate ioctl
for device)
20:03:03.982917 write(3, "GET / HTTP/1.1\r\nHost: 4mlinux.com\r\nUser-Agent:
Wget\r\nConnection: close\r\n\r\n", 74) = 74
20:03:03.983025 shutdown(3, SHUT_WR)    = 0
20:03:03.983110 alarm(900)              = 900
20:03:03.983174 read(3, "", 1024)       = 0
20:03:03.997494 write(2, "wget: error getting response\n", 29) = 29
20:03:03.997859 exit(1)                 = ?
20:03:03.998347 +++ exited with 1 +++

The peer simply does not return anything. It closes its connection.

Probably it detects wget closing its writing end (the shutdown(3, SHUT_WR)
thing).

The point it, closing write side of the socket is _valid_ for HTTP.
wget sent the full request, it won't be sending anything more: it will only
receive the response, and that's it.
(It even said so with "Connection: close" header, although it should work
without that too).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list