Commit Graph

96 Commits

Author SHA1 Message Date
Denis Vlasenko
3526a1320a wget: wrap one atrociously long line (around 200 chars long!). 2006-09-09 12:20:57 +00:00
Denis Vlasenko
21afc7dc29 uuencode: common implementation for wget and uuencode (closing bug 694) 2006-09-03 15:49:40 +00:00
Bernhard Reutner-Fischer
bfbc4ebf40 - patch from Csaba Henk to make the "User-Agent" header field configurable. 2006-09-02 15:30:26 +00:00
Bernhard Reutner-Fischer
289e86a0a5 - typo s/ENABLE_WGET_LONG_OPTIONS/ENABLE_FEATURE_WGET_LONG_OPTIONS/g 2006-08-20 20:01:24 +00:00
Rob Landley
d921b2ecc0 Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes...  General cleanup pass.  What I've
been doing for the last couple days.

And it conflicts!  I've removed httpd.c from this checkin due to somebody else
touching that file.  It builds for me.  I have to catch a bus.  (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
Rob Landley
c9c1a41c58 A couple things that got tangled up in my tree, easier to check in both than
untangle them:

Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the
signal list to that required by posix (they can specify the numbers for
the rest if they really need them).  (This is preparatory cleanup for adding
a timeout applet like Roberto Foglietta wants.)

Export the itoa (added due to Denis Vlasenko, although it's not quite his
preferred implementation) from xfuncs.c so it's actually used, and remove
several other redundant implementations of itoa and utoa() in the tree.
2006-07-12 19:17:55 +00:00
Rob Landley
af12cb39d1 Patch from Geoff Baker to fix bug http://bugs.busybox.net/view.php?id=905 by
changing wget's ftp code not to chdir but to use the complete path each time.
2006-06-27 18:41:03 +00:00
Rob Landley
19a3940f15 Patch from Denis Vlasenko:
* Rename a var: statbytes -> transferred
* cursize == transferred, always. Nuke cursize.
* Make progressmeter() a nop if !CONFIG_FEATURE_WGET_STATUSBAR
  (reduces #ifdef forest)
* double elapsed -> int elapsed
* Do not sprintf to buf first and then write(STDERR) it,
  just fprintf directly to stderr
* Progress bar printing code made smaller
* Style fixes
2006-06-13 17:10:26 +00:00
Rob Landley
76ef08c5e3 Whitespace cleanup from Denis Vlasenko. 2006-06-13 16:44:26 +00:00
Bernhard Reutner-Fischer
1b9d7c9aa9 - use bb_msg_{read,write}_error where appropriate.
text	   data	    bss	    dec	    hex	filename
 825015	   9100	 645216	1479331	 1692a3	busybox.old
 824919	   9100	 645216	1479235	 169243	busybox
2006-06-03 22:45:37 +00:00
Bernhard Reutner-Fischer
8d3a6f7aaf - add CONFIG_FEATURE_WGET_LONG_OPTIONS 2006-05-31 14:11:38 +00:00
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Bernhard Reutner-Fischer
b1629b1b2a - remove emacs layout block as suggested by Robert P.J. Day
- use shorter boilerplate while at it
2006-05-19 19:29:19 +00:00
Bernhard Reutner-Fischer
a2a647dfc1 - include strings.h
Thanks to Rich Felker for pointing this out.
2006-05-19 12:30:00 +00:00
Rob Landley
6f2a0b2275 Small tweak cherry-picked from Devin Bayer's monster MacOS X patch. 2006-02-21 18:34:54 +00:00
Eric Andersen
0cb6f35c33 fix up annoying signed/unsigned and mixed type errors 2006-01-30 22:30:41 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Rob Landley
d1569c215c If we really _need_ an #ifdef like this, then we should be using the libbb
getopt infrastructure instead.
2005-12-02 17:57:23 +00:00
"Vladimir N. Oleynik"
f704b27b5b - new bb_opt_complementally syntax, use [-:?] only - 'free' chars
- new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets
- use bb_default_error_retval for env applet
2005-10-14 09:56:52 +00:00
"Vladimir N. Oleynik"
27421a1878 1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Eric Andersen
14f5c8d764 Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Eric Andersen
751750e3ee Patch from Denis Vlasenko to fix a problem where
wget http://1.2.3.4/abc/ loses last '/'
2004-10-08 08:27:40 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Glenn L McGrath
32da885a91 Fix ftp resume
Terminate returned message at <CRLF> so strtoul returns without error
2004-04-08 10:27:11 +00:00
Eric Andersen
70060d25d2 s/fileno\(stdin\)/STDIN_FILENO/g
s/fileno\(stdout\)/STDOUT_FILENO/g
2004-03-27 10:02:48 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
2479445562 Fix/eliminate use of atol 2004-03-06 22:11:45 +00:00
Glenn L McGrath
f1c4b11b24 No need to check proxy env variable twice, ignore proxy env variable if
its set to 0
2004-02-22 00:27:34 +00:00
Glenn L McGrath
24cb17f9be Fix http proxy use, bytes were swapped 2004-01-31 08:08:57 +00:00
Eric Andersen
f2ec37902a Pascal Brisset writes:
uuencode fails to encode binary data because it right-shifts
bytes as signed chars and keeps the duplicated sign bits.

The original base64_encode() from wget/http.c is broken as well,
but it is only used to encode ascii data.

-- Pascal
2004-01-26 07:17:30 +00:00
Glenn L McGrath
58a2e0e262 Patch from Leif Lindholm (slightly modified by me), to fix http
redirection.
Example of incorrect behaviour was the following url, busybox wget didnt
get redirected to the busybox url as it should.
http://freshmeat.net/redir/busybox/953/url_homepage/www.busybox.net
2004-01-17 23:07:14 +00:00
Glenn L McGrath
036dbaa082 Modify bb_lookup_port to allow the protocol to be specified, allowing
/etc/services support for inetd, netcat and tftp.
2004-01-17 05:03:31 +00:00
Glenn L McGrath
f980bd5848 Fix a bug of mine, identified by Stephane Billiart 2003-12-27 00:21:47 +00:00
Glenn L McGrath
ffccf6eb5d Change interface to bb_lookup_host, dont try and set port inside this
function as there is no gracefull way of handling failures.
Rename bb_getport to bb_lookup_port, allow a default port to be
specified so it always returns a correct value.
Modify ftpgetput/rdate/wget to use the new interface.
wget/rdate now use etc/services with a falback default value.
2003-12-20 01:47:18 +00:00
Glenn L McGrath
514aeabc36 Use getopt_ulflags 2003-12-19 12:08:56 +00:00
Eric Andersen
e6dc439b3a Rework wget, the xconnect interface, and its various clients
in order to fix the problems with round robin DNS reported
by Andrew Flegg:
    http://busybox.net/lists/busybox/2003-October/009579.html

This removes the ipv6 specific xconnect dns lookups.  I do
not see why that would need to be special cased for ipv6 as
was done, but that will just have to be tested.

So IPV6 people -- please test this change!

 -Erik
2003-10-31 09:31:46 +00:00
Eric Andersen
8efe967018 Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
to ensure proper fallback behavior on, i.e. serial consoles.
 -Erik
2003-09-15 08:33:45 +00:00
Eric Andersen
6231f092bd Patch from Philip Blundell:
On Thu, 2003-09-11 at 01:09, Glenn McGrath wrote:
> Applied

Thanks.  Unfortunately there was one small bug in that last patch.
Could you apply this one as well?

p.
2003-09-11 08:25:11 +00:00
Glenn L McGrath
cc20ebc11e add ipv6 literal support to wget 2003-09-10 23:52:15 +00:00
Glenn L McGrath
23365976f8 Correct logic in determining size of block to download, as pointed out
by Junio C Hamano
2003-08-29 06:25:04 +00:00
Glenn L McGrath
e7bdfccb3f "When the initial request by wget is responded by a 3XX redirect
response sent in chunked transfer encoding, the code path to
resubmit the request to the redirected URL forgets to reset
got_clen and chunked variables in the loop.  If the redirected
URL does not use chunked transfer encoding, this causes the code
that slurps the body of the response to incorrectly try to parse
out the chunk length which does not exist." - junkio@

----------------------------------------------------------------------
2003-08-28 22:03:19 +00:00
Glenn L McGrath
83e4a5bccf "When the filesize is known from content-length header, safe_fread is
always told to read sizeof(buf).  This waits until the underlying
fread() to time-out for the last part of the downloaded body.  Fix
this by sending the number of remaining bytes to read when known." -
junkio@
I reworked the logic in his patch
2003-08-28 21:55:22 +00:00
Eric Andersen
85e5e72bc1 Remove remaining libc5 support code 2003-07-22 08:56:55 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
3f1cf455a0 cope with crappy windoze ftp servers 2003-03-11 18:03:39 +00:00
Robert Griebl
e8fcf4bd69 Accept the --passive-ftp cmd.line option. We always use passive ftp mode,
so it doesn't hurt (adds compatibility though)
2002-07-12 00:04:46 +00:00
Eric Andersen
0b31586c71 A patch from Bart Visscher <magick@linux-fan.com> to add an
xconnect helper routine which does:
        -address and port resolving
	-tries to connect to all resolved addresses until connected
	-uses getaddrinfo, so works for IPv6 too
This patch also ports rdate, telnet, and wget to use the new
xconnect function.  Thanks Bart!
2002-07-03 11:51:44 +00:00
Robert Griebl
d77601178d Added support for -Y|--proxy=on/off to wget 2002-05-14 23:36:45 +00:00
Matt Kraai
272a95524f * networking/wget.c (wget_main): Check return value of safe_fwrite. 2002-04-17 15:33:24 +00:00
Matt Kraai
0efab3319d * networking/wget.c (parse_url): Allocate a string for the empty path.
* testsuite/wget/wget-handles-empty-path: New.
2002-03-19 15:22:42 +00:00