aboutsummaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-10 23:25:53 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-10 23:25:53 +0000
commit067e3f031a2107c69d287d89b9543fbfe5c0a571 (patch)
tree35edda4508915e2b454d0c0ec48cd548deccd744 /networking/wget.c
parent07159f0f0e2188b1ce3bf7bc6b282f08986fd5ee (diff)
downloadbusybox-w32-067e3f031a2107c69d287d89b9543fbfe5c0a571.tar.gz
busybox-w32-067e3f031a2107c69d287d89b9543fbfe5c0a571.tar.bz2
busybox-w32-067e3f031a2107c69d287d89b9543fbfe5c0a571.zip
wget: fix error message.
Bad: wget http://127.0.0.1:81/fgdg/Makefile Connecting to 127.0.0.1[127.0.0.1]:81 : HTTP/1.0 404 Not Foundror 404 Not Found Good: wget http://127.0.0.1:81/fgdg/Makefile Connecting to 127.0.0.1[127.0.0.1]:81 get: server returned error: HTTP/1.0 404 Not Found nslookup: fix my mistake applets: make Bernhard Fischer <rep.nop@aon.at> happy :)
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 8850fdfb7..a4c6289cb 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -324,8 +324,9 @@ int wget_main(int argc, char **argv)
324 break; 324 break;
325 /*FALLTHRU*/ 325 /*FALLTHRU*/
326 default: 326 default:
327 chomp(buf); 327 /* Show first line only and kill any ESC tricks */
328 bb_error_msg_and_die("server returned error %s: %s", s, buf); 328 buf[strcspn(buf, "\n\r\x1b")] = '\0';
329 bb_error_msg_and_die("server returned error: %s", buf);
329 } 330 }
330 331
331 /* 332 /*
@@ -585,6 +586,8 @@ static FILE *open_socket(struct sockaddr_in *s_in)
585{ 586{
586 FILE *fp; 587 FILE *fp;
587 588
589 /* glibc 2.4 seems to try seeking on it - ??! */
590 /* hopefully it understands what ESPIPE means... */
588 fp = fdopen(xconnect_tcp_v4(s_in), "r+"); 591 fp = fdopen(xconnect_tcp_v4(s_in), "r+");
589 if (fp == NULL) 592 if (fp == NULL)
590 bb_perror_msg_and_die("fdopen"); 593 bb_perror_msg_and_die("fdopen");