1 2009-07-28 Micah Cowan <micah@cowan.name>
3 * main.c (option_data): Rename --html-extension to
7 * options.h (struct option): Rename html_extension to
9 * http.c (gethttp): Ditto.
10 * convert.c (local_quote_string): Ditto.
12 * init.c (commands): Add "adjustextension", and reflect rename
13 change for opt.adjust_extension, for both "adjustextension" and
16 2009-07-27 Micah Cowan <micah@cowan.name>
18 * options.h (struct options): Added restrict_files_nonascii
21 * url.c (FILE_CHAR_TEST): Add check for chars outside the ASCII
24 * init.c (defaults): Add restrict_files_nonascii to initialization.
25 (cmd_spec_restrict_file_names): Allow parsing of "ascii" keyword.
27 2009-07-27 Marcel Telka <marcel@telka.sk>
29 * iri.c (do_conversion): Typo: invalide -> invalid
31 2009-07-27 Petr Pisar <petr.pisar@atlas.cz>
33 * main.c (print_help): Fixed a couple typos.
35 2009-07-26 Micah Cowan <micah@cowan.name>
37 * main.c (option_data): Rename --locale option to --local-encoding
38 (print_help): Document --no-iri, --local-encoding, and
39 --remote-encoding, within usage message. Remove defunct
40 --preserve-permissions.
42 2009-07-23 Micah Cowan <micah@cowan.name>
44 * progress.c (get_eta): Change "Translation note" in comment to
45 "TRANSLATORS", so it actually appears in wget.pot.
47 2009-07-06 Micah Cowan <micah@cowan.name>
49 * main.c (print_help): Improve documentation of --base.
51 2009-07-05 Micah Cowan <micah@cowan.name>
53 * html-url.c (tag_handle_meta): Handle meta name="robots"
54 properly: deal with whitespace, commas after...
56 * netrc.c (parse_netrc): Rename local-scope variable "quote" to
57 "qmark", to avoid conflict with the function name.
59 2009-07-05 Petr Pisar <petr.pisar@atlas.cz>
61 * main.c (print_version): Mark initial line for translation, along
62 with (env), (user), and (system). Change copyright year to 2009.
64 * http.c (http_loop): Space after colon.
66 * gnutls.c (ssl_check_certificate): Use quote function, rather
69 2009-07-05 Micah Cowan <micah@cowan.name>
71 * Makefile.am (version.c): Add dependency on configure.ac.
73 * iri.c: Mark some strings for translation.
75 2009-07-04 Steven Schweda <sms@antinode.info>
77 * wget.h (ORIG_SFX): Macro added, to supply an alternative "_orig"
80 * connect.c, host.c, host.h, main.c: Include "vms_ip.h" rather
81 than <netdb.h> on VMS systems.
83 * convert.c (write_backup_file): Use "_orig" rather than ".orig"
86 * ftp-basic.c (ftp_list): Don't use LIST -a on VMS servers.
88 * ftp.c [__VMS]: Include "vms.h"
89 * ftp.c (getftp): Disable some unhelpful "for VMS" code. Pass the
91 (getftp) [__VMS]: Alter the filename as required, and invoke fopen
92 with extra optional arguments.
93 (ftp_retrieve_list): Set permissions before setting the times.
95 * ftp-ls.c [__VMS]: Various improvements.
97 * http.c (SET_USER_AGENT): Added. Include operating-system info in
98 the User-Agent header.
99 (gethttp): Use ORIG_SFX macro.
100 (gethttp) [__VMS]: invoke fopen with extra arguments to
101 communicate file type.
102 (http_loop): Add cast to time_t.
104 * init.c (wgetrc_user_file_name) [__VMS]: Adjustments for where to
107 * log.c: Adjustments to improve handling of log files on VMS.
109 * main.c [__VMS]: Added --ftp-stmlf option (and associated
110 documentation). Adjust description of backup-suffixes, as they now
112 (print_help, print_version): Include OS type in version
114 (main) [__VMS]: Invoke fopen with extra options, to specify file
117 * netrc.c (search_netrc) [__VMS]: Fix .netrc-finding.
119 * openssl.c, openssl.h (ssl_connect_wget): Renamed from ssl_connect.
121 * options.h (struct options): Add ftp_stmlf field.
123 * retr.c (write_data) [__VMS]: Avoid fflush.
125 * url.c [__VMS]: Include vms.h.
126 * url.c (url_file_name) [__VMS]: Handle naming as required for VMS.
128 * utils.c [__VMS]: Include vms.h. Various added facilities for VMS
131 2009-07-04 Micah Cowan <micah@cowan.name>
133 * main.c (print_version): Allow localization of the version-info
134 labels, eschew attempts at alignment (which is complicated when
135 handling translated strings), and avoid using printf() with
136 variable-stored format strings that lack conversion
138 (format_and_print_line): For similar reasons, don't calculate
139 line-continuation tabulation based on the number of bytes in a
142 2009-07-04 Steven Schubiger <stsc@member.fsf.org>
144 * url.c (url_parse): If an URL scheme is invalid, distinguish
145 between an unsupported or missing scheme.
147 * url.c: Add a "missing scheme" entry to parse_errors.
149 2009-07-03 Micah Cowan <micah@cowan.name>
151 * iri.h (iri_dup): Provide macro definition for when IRIs are
154 * Makefile.am (LIBS): Added @LIBICONV@.
155 (wget_SOURCES): Added iri.h.
156 (EXTRA_wget_SOURCES): Added iri.c, so it gets packaged even if IRI
157 support was disabled.
159 2009-07-02 Micah Cowan <micah@cowan.name>
161 * recur.c (url_enqueue): Quote enqueue/dequeue debug messages.
163 * html-url.c (append_url): Change "merge()" quoting style from
164 locale_quoting_style to escape_quoting_style.
166 2009-07-01 Micah Cowan <micah@cowan.name>
168 * retr.c (retrieve_url): Use the existing "redirect" label,
169 instead of superfluous "second_try". Removed no-longer-accurate
170 debug statement. Use the "newloc" parameter to store the fallback
171 URL, when IRI version was rejected.
173 * recur.c (retrieve_tree): Always use the parsed URL for tracking
174 the Referer, since that's the one we actually requested (if
175 there's a difference in terms of percent-encodings and such).
177 2009-07-01 Steven Schubiger <stsc@member.fsf.org>
179 * Makefile.am: Add a rule to generate build_info.c and list
180 the build_info.c.in file in EXTRA_DIST. Adjust elsewhere
183 * build_info.c: Remove this static source file.
185 * build_info.c.in: Data for generation of build_info.c.
187 2009-06-29 Micah Cowan <micah@cowan.name>
189 * html-url.c (append_url): Quote some more arguments that might
190 contain characters that are inappropriate to display for the
193 * retr.c (retrieve_from_file): Be sure to pass iri information
194 when parsing an input-fle url, and be sure to hand a clean iri
195 struct, off to retrieve_tree and retrieve_url.
197 * iri.c, iri.h (iri_dup): Added.
199 * retr.c (retrieve_url): Re-parse for IRI fallback.
201 * main.c (main): Set up iri before the url_parse invocation (so we
204 2009-06-20 Jay Krell <jay.krell@cornell.edu>
206 * sysdep.h (_ALL_SOURCE): (small change) Define the _ALL_SOURCE
207 macro on INTERIX systems. (I switched the location from ftp.c to
210 2009-06-15 Micah Cowan <micah@cowan.name>
212 * ftp.c (getftp): If we can't accept the connection, return
213 CONERROR, not whatever the contents of err happens to be. Fixes
216 * retr.c (fd_read_body): Make both args to progress_create
217 consistent, resulting in an accurate progress display. Fixes bug
220 2009-06-14 Micah Cowan <micah@cowan.name>
222 * Makefile.am (wget_SOURCES): css-tokens.h needs to ship with
225 2009-06-13 Micah Cowan <micah@cowan.name>
227 * init.c: Rename setval_internal_wrapper to setval_internal_tilde,
228 ensure we don't "replace" the tilde unless it's actually
229 present. Clean up some minor GNU style issues.
231 2009-06-13 Julien Pichon <julienpichon7@gmail.com>
233 * init.c: Handle tilde-expansion in wgetrc commands, without
234 resorting to setting/unsetting globals to change behavior in one
237 2009-06-12 Micah Cowan <micah@cowan.name>
239 * host.c: Include <sys/types.h> before <sys/socket.h>. Not
240 required by POSIX any more, but some older systems (such as
241 FreeBSD 4.1) still need it, and it doesn't seem like it could
244 * build_info.c (library): Handle "https" as a feature in its own
245 right, apart from "gnutls" and "openssl".
247 * host.c: Declare h_errno if no declaration is provided. Idea
248 thanks to Maciej W. Rozycki.
250 2009-06-11 Xin Zou <zouxin2008@gmail.com>
252 * http.c (gethttp): Fix some memory leaks.
254 2009-06-11 Micah Cowan <micah@cowan.name>
256 * http.c (http_atotm): Handle potential for setlocale's return
257 value to be static storage. Thanks to Benjamin Wolsey
258 <bwy@benjaminwolsey.de>.
260 * sysdep.h: Need NAMESPACE_TWEAKS on non-Linux glibc-based
261 systems, too. Thanks to Robert Millan.
263 2009-05-28 Steven Schubiger <stsc@member.fsf.org>
265 * ftp.c (ftp_get_listing): Update the "listing file"
266 string after calling ftp_loop_internal().
268 2009-05-27 Steven Schubiger <stsc@member.fsf.org>
270 * ftp.c (ftp_get_listing): Duplicate the "listing file"
271 string to avoid memory corruption when FOPEN_EXCL_ERR is
274 2009-05-17 Steven Schubiger <stsc@member.fsf.org>
276 * progress.c (eta_to_human_short): Fix the remaining hours
277 to be displayed. Spotted by Tadeu Martins (#26411).
279 2009-04-24 Micah Cowan <micah@cowan.name>
281 * hash.c: Change stdint.h inclusion to use HAVE_STDINT_H, not C99
284 * connect.c: stdint.h inclusion added.
286 Thanks to Markus Duft <mduft@gentoo.org> for a similar patch.
288 2009-04-20 Micah Cowan <micah@cowan.name>
290 * Makefile.am (version.c): Fix unportable use of "echo -n".
292 2009-04-13 Steven Schubiger <stsc@member.fsf.org>
294 * ftp.c (ftp_retrieve_list): Move the duplicated code that
295 determines the local file to a function.
297 * http.c (http_loop): Likewise.
299 * retr.c (set_local_file): New function.
301 2009-04-11 Steven Schubiger <stsc@member.fsf.org>
303 * init.c (initialize): Run a custom SYSTEM_WGETRC when
304 provided as an environment variable.
306 2009-02-27 Gisle Vanem <gvanem@broadpark.no>
308 * main.c (main): "freopen (NULL,.." causes an assertion in MSVC
309 debug-mode. I.e. NULL isn't legal. But the "CONOUT$" device works
312 2009-02-27 Steven Schubiger <stsc@member.fsf.org>
314 * ftp.c (ftp_loop_internal): Don't claim for FTP retrievals
315 when writing to standard output either that the document
316 has been saved. Addresses bug #20520 again.
318 2009-02-21 Steven Schubiger <stsc@member.fsf.org>
320 * http.c (http_loop): When a document is written to
321 standard output, don't claim it has been saved to a file.
322 Addresses bug #20520.
324 2009-02-18 Steven Schubiger <stsc@members.fsf.org>
326 * recur.h: Remove the dangling declaration for recursive_cleanup().
328 2009-02-01 Gerardo E. Gidoni <gerel@gnu.org>
330 * main.c, recur.c, recur.h, res.c, retr.c, retr.h: restructured code to
331 avoid multiple 'url_parse' calls.
333 2008-11-13 Micah Cowan <micah@cowan.name>
335 * http.c (gethttp): Don't do anything when content-length >= our
338 2008-11-27 Saint Xavier <wget@sxav.eu>
340 * http.c (gethttp): Move authentication code before filename
341 allocation avoiding fallbacking on default filename because
342 "Content-Disposition" header wasn't present before authentcation
343 has been completed. Fixes bug #24862.
345 2008-11-16 Steven Schubiger <stsc@members.fsf.org>
347 * main.c: Declare and initialize the numurls counter.
349 * ftp.c, http.c: Make the counter visible here and use it.
351 * options.h: Remove old declaration from options struct.
353 2008-11-15 Steven Schubiger <stsc@members.fsf.org>
355 * init.c (defaults): Set default waitretry value.
357 2008-11-14 Steven Schubiger <stsc@members.fsf.org>
359 * main.c (format_and_print_line): Use a custom format
360 string for printing leading spaces.
362 2008-11-12 Micah Cowan <micah@cowan.name>
364 * ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href.
366 2008-11-12 Alexander Belopolsky <alexander.belopolsky@gmail.com>
368 * url.c, url.h (url_escape_unsafe_and_reserved): Added.
370 * ftp-ls.c (ftp_index): URL-escape, rather than HTML-escape, the
371 filename appearing in the link.
373 2008-11-12 Steven Schubiger <stsc@members.fsf.org>
375 * main.c (print_version): Hand the relevant
376 xstrdup/xfree calls back to format_and_print_line().
378 2008-11-11 Steven Schubiger <stsc@members.fsf.org>
380 * main.c (format_and_print_line): Move both the memory
381 allocating and freeing bits upwards to print_version().
383 2008-11-10 Saint Xavier <wget@sxav.eu>
385 * http.c: Make --auth-no-challenge works with user:pass@ in URLs.
387 2008-11-05 Micah Cowan <micah@cowan.name>
389 * ftp.c (print_length): Should print humanized "size remaining"
390 only when it's at least 1k.
392 2008-10-31 Micah Cowan <micah@cowan.name>
394 * main.c (print_version): Add information about the mailing list.
396 2008-10-31 Alexander Drozdov <dzal_mail@mtu-net.ru>
398 * retr.c (fd_read_hunk): Make assert deal with maxsize == 0.
400 * ftp-ls.c (clean_line): Prevent underflow on empty lines.
402 2008-10-26 Gisle Vanem <gvanem@broadpark.no>
404 * main.c (format_and_print_line): Put variables on top of
405 blocks (not all compilers are C99). Add an extra '\n' if
406 SYSTEM_WGETRC isn't defined and printed.
408 2008-09-09 Gisle Vanem <gvanem@broadpark.no>
410 * url.c (url_error): Use aprintf, not asprintf.
412 2008-09-09 Micah Cowan <micah@cowan.name>
414 * init.c (home_dir): Save the calculated value for home,
415 to avoid duplicated work on repeated calls.
416 (wgetrc_file_name) [WINDOWS]: Define and initialize home var.
418 * build_info.c, main.c: Remove unnecessary extern vars
419 system_wgetrc and locale_dir.
421 * main.c: Define program_name for lib/error.c.
423 2008-09-02 Gisle Vanem <gvanem@broadpark.no>
425 * mswindows.h: Must ensure <stdio.h> is included before
426 we redefine ?vsnprintf().
428 2008-08-08 Steven Schubiger <stsc@members.fsf.org>
430 * main.c, utils.h: Removed some dead conditional DEBUG_MALLOC code.
432 2008-08-03 Micah Cowan <micah@cowan.name>
434 * main.c (print_help): Added --default-page.
436 2008-08-01 Joao Ferreira <joao@joaoff.com>
438 * init.c, main.c, options.h, url.c: Added option --default-page
439 to support alternative default names for index.html
441 2008-08-03 Micah Cowan <micah@cowan.name>
443 * build_info.c, css-url.c: #include wget.h, not config.h.
445 2008-08-03 Steven Schubiger <stsc@members.fsf.org>
447 * url.c, url.h (url_error): Better messages for unsupported
448 schemes, especially https.
450 * html-url.c, recur.c, retr.c: Adjust to new url_error
451 invocation, and free result.
453 2008-07-17 Steven Schubiger <stsc@members.fsf.org>
455 * retr.c (retrieve_from_file): When given an URL as input file,
456 use it as baseref if none was specified and treat the input file
457 as HTML if its content type is text/html.
459 * init.c (cleanup): Free the memory associated with the base
460 option (when DEBUG_MALLOC is defined).
462 2008-07-02 Xavier Saint <wget@sxav.eu>
464 * iri.c, iri.h : New function idn_decode() to decode ASCII
465 encoded hostname to the locale.
467 * host.c : Show hostname to be resolved both in locale and
470 2008-06-28 Steven Schubiger <stsc@members.fsf.org>
472 * retr.c (retrieve_from_file): Allow for reading the links from
473 an external file (HTTP/FTP).
475 2008-06-26 Xavier Saint <wget@sxav.eu>
477 * iri.c, iri.h : New functions locale_to_utf8() and
478 idn_encode() adding basic capabilities of IRI/IDN.
480 * url.c : Convert URLs from locale to UTF-8 allowing a basic
483 2008-06-25 Steven Schubiger <stsc@members.fsf.org>
485 * ftp.c (getftp): When spidering a FTP URL, emit a diagnostic
486 message if the remote file exists.
488 2008-06-24 Steven Schubiger <stsc@members.fsf.org>
490 * http.c (http_loop): Replace escnonprint() occurence with
491 a quotearg_style() call.
493 2008-06-24 Micah Cowan <micah@cowan.name>
495 * ftp-ls.c (ftp_index): Don't assume time_t* is compatible with
496 long*. Fixes crash on Windows, and probably other systems.
498 2008-06-22 Steven Schubiger <stsc@members.fsf.org>
500 * http.c: Explicitly initialize and deallocate the message
501 string used by the -nv --spider functionality.
503 2008-06-22 Steven Schubiger <schubiger@gmail.com>
505 * http.c: Make -nv --spider include the file's name when it
508 2008-06-22 Micah Cowan <micah@cowan.name>
510 * Makefile.am (version.c): Fixed version string invocation so it
511 once again can't result in unterminated strings, made all the
512 string vars pointers-to-const, and moved line lengths
513 below 80 (in Makefile.am, not in version.c).
515 2008-06-19 Xavier Saint <wget@sxav.eu>
517 * iri.c, iri.h : New function check_encoding_name() as
518 a preliminary encoding name check.
520 * main.c, iri.c : Make use of check_encoding_name().
522 2008-06-19 Xavier Saint <wget@sxav.eu>
524 * iri.c : Include missing stringprep.h file and add a
527 * init.c : set a default initial value for opt.enable_iri,
528 opt.locale and opt.encoding_remote.
530 2008-06-19 Xavier Saint <wget@sxav.eu>
532 * iri.c, iri.h : Add a new function find_locale() to find
533 out the local system encoding.
535 * main.c : Make use of find_locale().
537 2008-06-19 Xavier Saint <wget@sxav.eu>
539 * html-url.c : Add "content-type" meta tag parsing for
540 retrieving page encoding.
542 * iri.h : Make no-op version of parse_charset() return
545 2008-06-16 Micah Cowan <micah@cowan.name>
547 * http.c (http_loop): When hstat.len is higher than the
548 successfully completed content's length, but it's because we
549 _set_ it that way, don't abort.
551 2008-06-14 Xavier Saint <wget@sxav.eu>
553 * iri.c, iri.h : New files.
555 * Makefile.am : Add files iri.h and conditional iri.c.
557 * build_info.c : Add compiled feature "iri".
559 * http.c : include iri.h and parse charset from Content-Type
562 * init.c, main.c, options.h : if an options isn't supported
563 at compiled time, don't get rid off it and show a dummy
564 message instead if they are used.
566 2008-06-13 Micah Cowan <micah@cowan.name>
568 * build_info.c: ENABLE_NTLM, not HAVE_NTLM; distinguish OpenSSL
571 2008-06-13 Madhusudan Hosaagrahara <com.gmail.hrmadhu>
573 * Makefile.am, main.c, init.c, init.h, build_info.c: Adds build
574 information to the --version command line option. Fixes bug
577 2008-06-01 Micah Cowan <micah@cowan.name>
579 * main.c [WINDOWS]: Reopen stdout in binary mode, when -O - is
582 2008-05-31 Micah Cowan <micah@cowan.name>
584 * html-url.c, http.c: Avoid casts in a couple spots.
586 2008-05-30 Henri Häkkinen <henux@users.sourceforge.net>
588 * cookies.c, ftp-basic.c, hash.c, html-url.c, http-ntlm.c, http.c,
589 init.c, log.c, main.c, progress.c, ptimer.c, spider.c, url.c,
590 utils.c: Minor changes to silence warnings when using -Wall.
592 2008-05-26 Steven Schubiger <schubiger@gmail.com>
594 * ftp.c (getftp): Replace last remaining invocation of escnonprint
597 2008-05-19 Micah Cowan <micah@cowan.name>
599 * main.c (main): Password prompt should be done only once (not
600 once per argument), and should be done prior to the background
603 2008-05-17 Steven Schubiger <schubiger@gmail.com>
605 * init.c (defaults): Set the preferred IP family to `none' by
608 2008-05-17 Kenny Parnell <k.parnell@gmail.com>
610 (cmd_spec_prefer_family): Initialize prefer_family to prefer_none.
612 2008-05-17 Micah Cowan <micah@cowan.name>
614 * main.c (main): Handle Ctrl-D on command-line.
616 2008-05-15 Steven Schubiger <schubiger@gmail.com>
618 * ftp.c (getftp): Verify that the file actually exists in FTP, by
619 checking it against the listing.
621 2008-05-15 Micah Cowan <micah@cowan.name>
623 * main.c (prompt_for_password): Use the quote module.
625 2008-05-14 Micah Cowan <micah@cowan.name>
627 * ftp.c (ftp_retrieve_list): Symlinks and other filenames
628 should be fully quoted.
630 2008-05-12 Micah Cowan <micah@cowan.name>
632 * main.c (main): Downgrade "-N with -O" to a warning, and switch
633 it off to avoid confusing messages.
635 2008-04-30 Micah Cowan <micah@cowan.name>
637 * progress.c (create_image): Fix glitch where too many spaces are
638 printed on lines that don't display the ETA, in multibyte
641 2008-04-30 Steven Schubiger <stsc@members.fsf.org>
643 * main.c (main): New code that handles prompting for passwords
644 when specified explicitly via command-line option (using gnulib's
646 (main): Include the getpass header.
648 * init.c: Add "ask-password" to the list of recognized commands.
650 * options.h: Add an according boolean member to the options
653 * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
654 out, because they're now defined independently by config.h.
656 2008-04-27 Rabin Vincent <rabin@rab.in>
658 * http.c (http_loop): Fix return for the case where we don't
659 download a file because of -nc.
661 2008-04-27 Micah Cowan <micah@cowan.name>
663 * url.c (path_simplify): Go back to allowing leading ".." in
664 paths, but only for FTP URLs.
665 (test_path_simplify): Add scheme-specificness to tests, adapt for
668 * test.c (all_tests): Add test_path_simplify.
670 * main.c (main): Downgrade -r, -p with -O to a warning rather than
671 an error; elaborate just a bit more for other -O combination
674 2008-04-26 Micah Cowan <micah@cowan.name>
676 * http.c (gethttp): Move proxy CONNECT handling to below the
677 retry_with_auth label, to deal with properly reconnecting to
678 proxies when we need to authenticate.
680 2008-04-25 Micah Cowan <micah@cowan.name>
682 * Makefile.am: -I foo -> -Ifoo.
684 2008-04-24 Micah Cowan <micah@cowan.name>
686 * main.c: Revised usage description of --convert-links to apply
687 to CSS as well as to HTML.
689 2008-04-23 Micah Cowan <micah@cowan.name>
691 * utils.c (test_dir_matches_p): Added a test for the case
692 described in issue #20518.
694 2008-04-22 Micah Cowan <micah@cowan.name>
696 * Makefile.am, css.lex, css.l: Renamed css.lex to css.l.
697 * recur.c (retrieve_tree): Fix typo to allow text/css files to
700 2008-04-22 Ted Mielczarek <ted.mielczarek@gmail.com>
702 * css.lex, css-url.c, css-url.h: Added to implement support for
704 * convert.c: Convert links in CSS files, too.
705 * convert.h (convert_options): Added for options link_css_p,
707 * convert.h: Added prototype for new register_css function.
708 * html-parse.c: Added support for parsing element content, in
709 addition to tag starts and ends.
710 * html-parse.h (taginfo): Added delimiter fields for element
713 * html-url.c (append_url): No longer internal-linkage only. Now
714 takes position and size as explicit parameters.
715 * html-url.c: Use new html-url.h header, add support for
716 handling of "style" HTML attributes. Mark URIs obtained from
717 link tags with rel="stylesheet" with link_expect_css. Adapt
718 uses of append_url to supply the newly-added parameters for
720 * http.c: Add detection for when the content-type is text/css;
721 and ensure that such files have the ".css" filename extension,
722 when --convert-links is active.
723 * recur.h: Remove declarations for functions found in
724 html-url.c (moved to html-url.h).
725 * recur.c: Add support for culling links from CSS files, too,
726 and tracking for when we're expecting the file to be CSS (even
727 when its content type isn't text/css).
728 * retr.c (retrieve_url): Add registration of CSS files.
729 * wget.h: Added TEXTCSS to dt flags enum.
730 * Makefile.am: Added css.lex, css-url.c, css-url.h, html-url.h
733 2008-04-22 Jim Paris <jim@jtan.com>
735 * openssl.c (ssl_init): Enable combined certificate/key in
736 single file (apparent regression from ~1.9). Resolves issue
739 2008-04-22 Steven Schubiger <schubiger@gmail.com>
741 * http.c (print_response_line): Changed to make responses always
742 be logged, even in --quiet mode, if --server-response was
743 specified. This is to bring http.c's handling of the situation
744 in line with ftp.c's.
746 2008-04-22 Pranab Shenoy <pranab.loosinit.shenoy@gmail.com>
748 * init.c: Added test_commands_sorted unit test to check is
749 commands are sorted. Fixes bug #21245.
751 * test.c: Added test_commands_sorted to the test suite.
753 2008-04-22 Rabin Vincent <rabin@rab.in>
755 * ftp.c (ftp_get_listing): Only remove .listing if it has been
758 2008-04-22 Alain Guibert <alguibert+bts@free.fr>
760 * test.h (mu_run_test): Move declaration before statements, for
761 C90 conformance. Fixes bug #22789.
763 2008-04-22 Mike Frysinger <vapier@gentoo.org>
765 * Makefile.am: Move @LIBS@ after other libraries, for better
766 static-linking support. Fixes bug #22143.
768 2008-04-16 Steven Schubiger <schubiger@gmail.com>
770 * ftp.c: Use Gnulib's quote function for printing filenames and
772 * connect.c: Likewise.
773 * convert.c: Likewise.
774 * cookies.c: Likewise.
775 * ftp-opie.c: Likewise.
776 * gnutls.c: Likewise.
779 * mswindows.c: Likewise.
780 * openssl.c: Likewise.
781 * progress.c: Likewise.
786 2008-04-16 Steven Schubiger <schubiger@gmail.com>
788 * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
789 out, because they're now defined independently by config.h.
791 2008-04-14 Steven Schubiger <schubiger@gmail.com>
793 * http.c: Use Gnulib's quote function for printing filenames and
795 * wget.h: #include "quote.h".
797 2008-04-12 Rabin Vincent <rabin@rab.in>
799 * mswindows.c (fake_fork_child): Don't create a logfile for
800 --background when --quiet is used, but not --server-response.
803 * utils.c (fork_to_background): Likewise.
805 2008-04-12 Micah Cowan <micah@cowan.name>
807 * utils.c (aprintf): Minor formatting changes to Alex's code (80-
808 column limit, concatenated string literals, avoiding nesting
809 levels), and removed invocation of free (since we're aborting
812 2008-04-11 Alexander Dergachev <cy6erbr4in@gmail.com>
814 * utils.c (aprintf): Now we are setting limits (1 Mb) for text
815 buffer when we use non-C99 vsnprintf.
817 2008-04-11 Micah Cowan <micah@cowan.name>
819 * ftp.c (getftp, ftp_loop_internal): Don't append to an existing
820 .listing when --continue is used. Fixes bug #22825. Thanks to
821 Rabin Vincent <rabin@rab.in> for pointing the way with a
824 2008-04-10 Alexander Dergachev <cy6erbr4in@gmail.com>
826 * xmalloc.c, xmalloc.h (memfatal): Now exported; accepts an
827 "unknown" value for the attempted allocation size.
828 * utils.c (aprintf): Now calls memfatal, instead of aborting.
830 2008-03-19 Micah Cowan <micah@cowan.name>
832 * utils.c (test_dir_matches_p): More tests related for
835 2008-03-17 Micah Cowan <micah@cowan.name>
837 * connect.c: Include sys/time.h to support use of the select
838 function on older systems.
840 2008-02-11 Benno Schulenberg <bensberg@justemail.net>
842 * http.c: More accurate and descriptive messages for when a file
843 won't be retrieved during spider-mode.
845 2008-02-10 Micah Cowan <micah@cowan.name>
847 * http.c: Added existence_checked member to the http_stat
849 (gethttp): Mark hs->existence_checked when we've checked whether
850 a file-to-download exists; so we don't check it again if the
851 connection gets lost (and potentially pick a new "unique" name).
852 This fixes bug 22251.
853 * progress.c (create_image): Add space for an extra column in
854 the "eta" portion of the progress bar image; to deal with
855 too-long Czech translation.
856 * main.c, http.c, init.c: Added --auth-no-challenge option, to
857 bring back 1.10.2 unsafe auth behavior when needed. This fixes
860 2008-02-07 Micah Cowan <micah@cowan.name>
862 * progress.c (create_image): Remove assertion on exceeding
863 screen width, which given the less-than-robust code there, can
864 be broken by a number of factors (such as large file downloads).
866 2008-02-06 Micah Cowan <micah@cowan.name>
868 * progress.c (countcols): Use strlen() when mbtowc or wcwidth
869 not available (or not using NLS).
870 * utils.c: Ensure we use single-byte separators when not doing
872 * wget.h: Determine whether to use NLS for progress-bars, based
873 on whether wcwidth and mbtowc are available.
875 2008-02-03 Micah Cowan <micah@cowan.name>
877 * progress.c (create_image): Use number of characters/columns
878 consumed, rather than number of bytes, to determine how much of
879 a line we've used. Fixes assertion errors and field alignment
880 bugs (#22161, #20481)
881 (get_eta, count_cols): Added to support the changes for
883 * http.c (http_loop): Put no-clobber logic back into http_loop,
884 before starting to fetch, for when we're not doing
887 2008-01-31 Micah Cowan <micah@cowan.name>
889 * http.c (gethttp): Don't derive hs->contlen from possibly
890 invalid/missing Content-Length; instead, get the appropriate
891 value from the Content-Range header values.
892 (parse_content_range): Handle '*' instance-length field.
894 2008-01-25 Micah Cowan <micah@cowan.name>
896 * main.c: Added notes to translators regarding (C), diacritics
898 * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
899 cookies.c, cookies.h, ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c,
900 ftp.h, gen-md5.c, gen-md5.h, gnutls.c, hash.c, hash.h, host.c,
901 host.h, html-parse.c, html-parse.h, html-url.c, http-ntlm.c,
902 http-ntlm.h, http.c, http.h, init.c, init.h, log.c, log.h,
903 main.c, mswindows.c, mswindows.h, netrc.c, netrc.h, openssl.c,
904 options.h, progress.c, progress.h, ptimer.c, ptimer.h, recur.c,
905 recur.h, res.c, res.h, retr.c, retr.h, spider.c, spider.h,
906 ssl.h, sysdep.h, test.c, test.h, url.c, url.h, utils.c,
907 utils.h, wget.h, xmalloc.c, xmalloc.h: Updated copyright year.
909 2007-12-10 Micah Cowan <micah@cowan.name>
911 * main.c: The option is --content-disposition, not
912 --no-content-disposition (at the moment).
914 2007-12-08 Hrvoje Niksic <hniksic@xemacs.org>
916 * ftp.c (ftp_retrieve_glob): Print both arguments of fnmatch in
917 fnmatch error message.
918 (ftp_retrieve_glob): Don't match with fnmatch if we're only
919 supposed to get one file.
921 2007-12-07 Micah Cowan <micah@cowan.name>
923 * Makefile.am: Plug in vars to include stuff from
924 $(top_srcdir)/md5 when appropriate.
926 2007-12-05 Micah Cowan <micah@cowan.name>
928 * utils.c (subdir_p): Handle the case where d1 is "".
929 * convert.c (convert_all_links): Don't return without
932 2007-11-28 Micah Cowan <micah@cowan.name>
934 * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
935 convert.h, cookies.c, cookies.h, ftp-basic.c, ftp-ls.c,
936 ftp-opie.c, ftp.c, ftp.h, gen-md5.c, gen-md5.h, gnutls.c,
937 hash.c, hash.h, host.c, host.h, html-parse.c, html-parse.h,
938 html-url.c, http-ntlm.c, http-ntlm.h, http.c, http.h, init.c,
939 init.h, log.c, log.h, main.c, mswindows.c, mswindows.h,
940 netrc.c, netrc.h, openssl.c, options.h, progress.c, progress.h,
941 ptimer.c, ptimer.h, recur.c, recur.h, res.c, res.h, retr.c,
942 retr.h, safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h,
943 sysdep.h, test.c, test.h, url.c, url.h, utils.c, utils.h,
944 wget.h, xmalloc.c, xmalloc.h: Updated license exception for
945 OpenSSL, per the SFLC.
947 2007-10-30 Micah Cowan <micah@cowan.name>
949 * main.c (main): Declare argv parameter as char **argv, rather
950 than char *const *argv. This fixes usage of getopt_long,
951 regardless of whether getopt_long has a constified argv or not.
953 2007-10-22 Gisle Vanem <gvanem@broadpark.no>
955 * mswindows.c: Move INHIBIT_WRAP macro definition up with wget.h
958 2007-10-18 Steven Schweda <sms@antinode.org>
960 * sysdep.h: #include <stdint.h> as well as <inttypes.h>, to work
961 around a glitch on Tru64 systems.
963 2007-10-18 Micah Cowan <micah@cowan.name>
965 * Makefile.am: version.c should not be distributed. Removed
966 config-post.h. Add version.c dependency and gnulib include path
968 * sysdep.h: Got contents of config-post.h
969 * config-post.h: Removed.
970 * wget.h: #include "config.h".
971 * alloca.c, cmpt.c, connect.c, convert.c, cookies.c,
972 ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, gen-md5.c, gnutls.c,
973 hash.c, host.c, html-parse.c, html-url.c, http-ntlm.c, http.c,
974 init.c, log.c, main.c, mswindows.c, netrc.c, openssl.c,
975 progress.c, ptimer.c, recur.c, res.c, retr.c, spider.c, url.c,
976 utils.c, xmalloc.c: Use wget.h at very top, and instead of
979 2007-10-15 Micah Cowan <micah@cowan.name>
981 * Makefile.am: Remove intermediary hg-id file generation, make
982 version.c-generation more portable.
984 2007-10-14 Micah Cowan <micah@cowan.name>
986 * cmpt.c, cookies.c, ftp-basic.c, ftp-ls.c, ftp.c, hash.c,
987 host.c, html-parse.c, html-url.c, http-ntlm.c, http.c, init.c,
988 log.c, main.c, netrc.c, openssl.c, res.c, url.c, utils.c,
989 wget.h: Replace uses of ISSPACE, etc with c_isspace, etc.
990 * gnu-md5.c, gnu-md5.h: Removed, in deference to gnulib.
991 * Makefile.am: Removed gnu-md5.h from wget_SOURCES.
992 * gen-md5.c: Changed #inclusion of gnu-md5.h to md5.h (gnulib's).
993 * recur.c (download_child_p): Print error if unlink of
995 * main.c (main): --spider or --delete-after now implies
996 --no-directories (thanks, Josh Williams).
998 2007-10-14 Joshua David Williams <yurimxpxman@gmail.com>
1000 * recur.c (download_child_p): Remove robots.txt if
1001 --delete-after or --spider is on.
1003 2007-10-13 Micah Cowan <micah@cowan.name>
1005 * Makefile.am: Make version.c depend on Wget dependencies (source
1006 files, plus such things as LIBOBJS so we get things like
1007 http-ntlm.c). Removed getopt.[ch], as we're now using gnulib for
1010 2007-10-10 Micah Cowan <micah@cowan.name>
1012 * http-ntlm.c: Include openssl/opensslv.h explicitly, instead of
1013 hoping it'll be included by accident in openssl/des.h.
1015 2007-10-09 Gisle Vanem <gvanem@broadpark.no>
1017 * mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer
1018 needed. Hence simply the prototype. Free 'exec_name' at exit.
1020 2007-10-09 Micah Cowan <micah@cowan.name>
1022 * gettext.h: Imported from /usr/share/gettext, fuller handling
1024 * wget.h: Remove logic for handling lack of NLS (now in
1026 * main.c: Use gettext's ENABLE_NLS rather than HAVE_NLS.
1027 * Makefile.am: added @LIBINTL@ to LIBS (though it probably
1028 belongs in LDADD, along with everything else currently assigned
1031 2007-10-08 Micah Cowan <micah@cowan.name>
1033 * http.c (http_loop): Add send_head_first conditional back
1034 around code that needs it, but not around the last-modified
1035 header-parsing stuff this time. Removed no-longer-useful (was it
1036 ever?) restart_loop boolean, continuing unconditionally at end
1037 of send_head_first conditional block (if we haven't jumped out).
1039 2007-10-04 Micah Cowan <micah@cowan.name>
1041 * http.c (http_loop): We've got_name if content_disposition
1042 support isn't on; make sure we continue properly in that case,
1043 even though we're not sending HEAD.
1044 * Makefile.in: Removed, replaced by Makefile.am.
1045 * Makefile.am: Converted from Makefile.in.
1047 2007-10-02 Gisle Vanem <gvanem@broadpark.no>
1049 * ftp.c: Use "_listing" for MSDOS (".listing" is illegal).
1051 * url.c: Update comment for 'filechr_not_windows'.
1053 * utils.c: Include <process.h> for 'getpid()' on Watcom.
1055 2007-10-02 Micah Cowan <micah@cowan.name>
1057 * ftp.c (getftp, ftp_loop_internal), http.c (http_loop), main
1058 (main): Use datetime_str instead of time_str, for those who have
1059 potentially long-running sessions. Based on suggestions by Saso
1060 Tomat <miskox@hotmail.com> and Steven M. Schweda
1062 * http.c (gethttp): Warn about host lookup failures. Adjusted
1063 from Stephen Gildea's patch.
1065 2007-10-02 Stephen Gildea <stepheng+wget@gildea.com>
1067 * connect.c (connect_to_host): Warn about host lookup failures.
1069 2007-09-25 Micah Cowan <micah@cowan.name>
1071 * Makefile.in: Use EXEEXT instead of exeext.
1073 2007-09-24 Gisle Vanem <giva@bgnett.no>
1075 * connect.c, init.c, main.c, openssl.c, options.h, sysdep.h,
1076 url.c, utils.c: Added support for building on MS-DOS.
1078 2007-09-24 Jochen Roderburg <roderburg@uni-koeln.de>
1080 * http.c (http_zero): Remove no-longer-used local_size variable.
1083 2007-09-12 Micah Cowan <micah@cowan.name>
1085 * http.c (http_loop): Remove send_head_first from condition for
1088 2007-08-29 Micah Cowan <micah@cowan.name>
1090 * openssl.c (ssl_init): Re un-const-ified the meth local
1091 variable, to match current versions of openssl.
1092 * spider.c: Removed visited_url function, as it may be very
1094 (print_broken_links): Removed traversal of referrers, until such
1095 time as a more efficient implementation can be written.
1096 * spider.h: Replaced declaration of visited_url with an
1097 empty-bodied, function-like macro.
1099 2007-08-27 Gisle Vanem <giva@bgnett.no>
1101 * mswindows.c (run_with_timeout): Ensure that the correct
1102 conversion specification is used for the return result of
1103 the GetLastError function.
1104 * getopt.c: Fix missing (but, accidentally, legal) comment
1105 delimiter after licensing text.
1106 * recur.c (retrieve_tree): Inserted missing cast for strip_auth.
1107 Includes adjustment by Ralf Wildenhues.
1108 * openssl.c (ssl_init): const-ified the meth local variable.
1109 * main.c: Include all the static function definitions in the
1110 "#ifndef TESTING" clause, leaving just the definitions for
1111 exec_name (not set), and opt.
1112 * utils.c (run_with_timeout): Now returns bool, to align with
1113 declaration in utils.h.
1115 2007-08-27 Micah Cowan <micah@cowan.name>
1117 * wget.h: Added macro replacement for ngettext, for environs
1120 2007-08-26 Micah Cowan <micah@cowan.name>
1122 * spider.c (print_broken_links): Fixed incorrect plurals msgid
1123 usage, switched to use ngettext function.
1125 2007-08-24 Micah Cowan <micah@cowan.name>
1127 * http.c (http_loop): Introduced time_came_from_head boolean
1128 flag, to help avoid parsing the same Last-Modified header twice.
1129 Replaced spidering returns of RETRUNNEEDED for some situations,
1130 to RETROK, as otherwise it will be interpreted as an error.
1131 RETRUNNEEDED appears never to be referenced outside of
1132 http.c (and wget.h), and, when returned by gethttp, is
1133 translated by http_loop to RETROK.
1134 * url.c (are_urls_equal): Don't call getchar_from_escaped_string
1135 if u2 is shorter than u1.
1136 (getchar_from_escaped_string): Don't decode reserved characters.
1137 Handle illegally appearing '%'s as literal '%'s. Ensure hex
1138 digits before attempting to decode.
1139 (test_are_urls_equal): Added tests to handle u2 shorter than u1,
1140 and %2f not treated the same as /.
1141 * spider.c (in_url_list_p): Don't call are_urls_equal if one of
1144 2007-08-23 Joshua David Williams <yurimxpxman@gmail.com>
1146 * spider.c (in_url_list_p): Removed the bool verbose argument
1148 2007-08-22 Mauro Tortonesi <mauro@ferrara.linux.it>
1150 * http.c (http_loop): Fall back to GET if HEAD fails with a 500 or 501
1153 2007-08-21 Mauro Tortonesi <mauro@ferrara.linux.it>
1155 * http.c (http_loop): Send preliminary HEAD request if -N is given and
1156 the destination file exists already.
1158 2007-08-10 Mauro Tortonesi <mauro@ferrara.linux.it>
1160 * http.c (http_loop): Fixed HTTP HEAD requests logic when --spider is
1163 2007-08-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1165 * url.c (append_uri_pathel): Do not assume dest string to be
1167 (test_append_uri_pathel): Terminate string to fix test failure.
1169 2007-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1171 * url.c (url_string): Use comparison, not assignment, in
1172 check for auth_mode == URL_AUTH_HIDE_PASSWD.
1174 2007-08-09 Micah Cowan <micah@cowan.name>
1176 * http.c (http_loop): If we got a HEAD and then a GET, and the
1177 GET had a timestamp, use that one, not any we may have gotten
1180 2007-08-08 Micah Cowan <micah@cowan.name>
1182 * init.c (defaults): Content disposition will not be default,
1183 since it currently results in extra round-trips.
1185 2007-07-31 Micah Cowan <micah@cowan.name>
1187 * http.c (gethttp): Set contlen = -1 when we encounter a
1188 negative-valued Content-Length header, so we don't consider it
1189 an internal error later on and call abort().
1191 2007-07-29 Micah Cowan <micah@cowan.name>
1193 * url.h, url.c (url_string): Replaced bool arg of the url_string
1194 function with enum url_auth_mode, with added option to
1195 completely remove user/pass auth information.
1196 * http.c, ftp.c, url.c, recur.c: Adapted call to url_string
1197 function to fit new usage.
1198 * recur.c (retrieve_tree): Remove auth info from Referer header.
1200 2007-07-28 Micah Cowan <micah@cowan.name>
1202 * options.h, init.c, retr.c, main.c: renamed opt maxredirect
1203 field to max_redirect, for improved consistency.
1204 * init.c: changed max_redirect parser from cmd_number_inf to
1205 cmd_number, as infinite redirects may not be appropriate.
1206 Alternatively, if cmd_number_inf should be used, then
1207 opt.max_redirect's value should be checked a bit differently in
1208 retr.c, to allow for the "infinite" meaning of zero.
1210 2007-07-25 Micah Cowan <micah@cowan.name>
1212 * http.c (create_authorization_line)
1213 (basic_authentication_encode, known_authentication_scheme_p)
1214 (load_cookies): Moved declarations up.
1215 (basic_authed_hosts): Added. Tracks what hosts have issued Basic
1216 challenge and been given the global username, password.
1217 (maybe_send_basic_creds): Added. Sends Basic creds for hosts that
1218 have issued Basic challenges.
1219 (register_basic_auth_host): Added. Instantiates
1220 basic_authed_hosts if necessary, then registers the host that
1221 has issued a challenge.
1222 (gethttp) <auth>: Only send authentication credentials after
1223 we've received a challenge from that host. This is a stop-gap
1224 fix until a proper fix can be implemented; still isn't quite
1225 right, as we should only be sending credentials automatically
1226 for authenticated paths and below, and not for the entire host.
1228 2007-07-16 Joshua David Williams <yurimxpxman@gmail.com>
1230 * options.h: added maxredirect to options struct
1231 * init.c: added maxredirect to list of variables
1232 * retr.c (retrieve_url): replaced MAX_REDIRECTIONS with opt.maxredirect
1233 * main.c: added option --max-redirect
1235 2007-07-16 Joshua David Williams <yurimxpxman@gmail.com>
1237 * test.h: tests made more verbose; now displays the name
1240 2007-07-10 Mauro Tortonesi <mauro@ferrara.linux.it>
1242 * http.c (http_loop): Fixed the HTTP requests logic. Now it skips the
1243 preliminary HEAD request if either -O or --no-content-disposition are
1244 given, and neither --spider and -N are given.
1246 2007-07-05 Micah Cowan <micah@cowan.name>
1248 * cmpt.c, connect.c, connect.h, convert.c, convert.h:
1249 * cookies.c, cookies.h, ftp-basic.c, ftp.c, ftp.h, ftp-ls.c:
1250 * ftp-opie.c, gen-md5.c, gen-md5.h, getopt.c, getopt.h, gnu-md5.c:
1251 * gnu-md5.h, gnutls.c, hash.c, hash.h, host.c, host.h:
1252 * html-parse.c, html-parse.h, html-url.c, http.c, http.h:
1253 * http-ntlm.c, http-ntlm.h, init.c, init.h, log.c, log.h, main.c:
1254 * Makefile.in, mswindows.c, mswindows.h, netrc.c, netrc.h:
1255 * openssl.c, options.h, progress.c, progress.h, ptimer.c:
1256 * ptimer.h, recur.c, recur.h, res.c, res.h, retr.c, retr.h:
1257 * safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h, sysdep.h:
1258 * test.c, test.h, url.c, url.h, utils.c, utils.h, wget.h:
1259 * xmalloc.c, xmalloc.h:
1260 Updated GPL reference to version 3 or later, removed FSF
1263 2007-07-04 Mauro Tortonesi <mauro@ferrara.linux.it>
1265 * http.c (http_loop): Skip HEAD request and start immediately with GET
1268 2007-02-02 Hrvoje Niksic <hniksic@xemacs.org>
1270 * http.c (print_server_response): Escape non-printable characters
1273 2007-02-02 Hrvoje Niksic <hniksic@xemacs.org>
1275 * netrc.c: Don't make netrc_list static, as it prevents
1276 compilation with DEBUG_MALLOC.
1278 * utils.c (aprintf): Don't use vasprintf when DEBUG_MALLOC is
1279 requested because, in that case, we want the calls to malloc to be
1282 2007-01-23 Hrvoje Niksic <hniksic@xemacs.org>
1284 * cookies.c (parse_set_cookie): Would erroneously discard cookies
1285 with unparsable expiry time.
1287 2007-01-23 Hrvoje Niksic <hniksic@xemacs.org>
1289 * progress.c (create_image): Check for ETA overflow.
1290 (print_row_stats): Ditto.
1292 2007-01-09 Mauro Tortonesi <mauro@ferrara.linux.it>
1294 * init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc
1295 warning about strict-aliasing violation.
1297 2007-01-09 Steven M. Schweda <sms@antinode.org>
1299 * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.
1301 2006-12-29 Gisle Vanem <giva@bgnett.no>
1303 * mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
1305 2006-12-27 Mauro Tortonesi <mauro@ferrara.linux.it>
1307 * http.c (parse_content_disposition): Consider directory prefix, if
1310 2006-11-21 Hrvoje Niksic <hniksic@xemacs.org>
1312 * retr.c (retrieve_from_file): Ditto.
1313 (url_uses_proxy): New function.
1315 * main.c (main): Don't check for opt.use_proxy when deciding
1316 whether to call retrieve_url or retrieve_tree; check whether the
1317 proxy would be used for *this* URL.
1319 2006-10-17 Mike Grant <mggr@pml.ac.uk>
1321 * ftp.c (ftp_loop_internal): Would incorrectly skip changing
1322 working directory when retrying after a failed FTP attempt.
1323 Originally reported by Nate Eldredge.
1325 2006-10-12 Mauro Tortonesi <mauro@ferrara.linux.it>
1327 * convert.c (downloaded_file): Fixed bug which used to break -E -k -K
1330 2006-08-28 Mauro Tortonesi <mauro@ferrara.linux.it>
1332 * http.c: #include'd spider.h to get rid of compiler warnings.
1338 2006-08-24 Mauro Tortonesi <mauro@ferrara.linux.it>
1340 * Makefile.in: Added spider.c to the list of files to compile and
1341 spider.h to the list of header files. Updated copyright information.
1343 * http.c: Major changes to recursive spider mode. Now for every
1344 resource we are supposed to check, we send a HEAD request to find out
1345 if it exists. If the resource is a HTML file, we retrieve it and parse
1346 it to discover links to other resources.
1350 * res.c (res_retrieve_file): Disable opt.timestamping and opt.spider
1351 when retrieving robots.txt. Updated copyright information.
1353 * convert.c: Moved code tracking broken links to spider.c.
1357 * spider.c: Created new file to keep track of visited URLs in spider
1362 2006-08-21 Mauro Tortonesi <mauro@ferrara.linux.it>
1364 * http.c: Fixed timestamping-related bug.
1366 2006-08-16 Mauro Tortonesi <mauro@ferrara.linux.it>
1368 * http.c: Fixed bug which broke --continue feature. Now if -c is
1369 given, http_loop sends a HEAD request to find out the destination
1370 filename before resuming download.
1372 2006-08-08 Hrvoje Niksic <hniksic@xemacs.org>
1374 * utils.c (datetime_str): Avoid code repetition with time_str.
1376 2006-07-21 Hrvoje Niksic <hniksic@xemacs.org>
1378 * init.c (commands): Correctly place "contentdisposition".
1380 2006-07-14 Mauro Tortonesi <mauro@ferrara.linux.it>
1382 * sysdep.h: If intptr_t isn't defined, simply typedef it to long.
1384 * http.c: Added explicit cast to int in logprintf call to remove
1385 compiler warnings on 64-bit platforms.
1387 * connect.c: Added a few casts to intptr_t to remove compiler warnings
1388 on 64-bit platforms.
1390 * main.c: Disable -r, -p and -N when -O is used. Disable -k when -O is
1391 used and multiple URLs are given. Update maintainer information.
1393 * all: Update copyright information.
1395 2006-07-10 KJKHyperion <hackbunny@reactos.com>
1397 * url.c (filechr_table): Mark DEL (0x7f) as a control character
1398 and | as a character Windows can't handle.
1400 2006-06-28 Mauro Tortonesi <mauro@ferrara.linux.it>
1402 * res.c: Implemented is_robots_txt_url function for detection of
1403 robots.txt URLs and related test routine.
1407 * url.c: Implemented are_urls_equal function for URL comparison and
1408 related testing routine.
1412 * convert.c: Fixes for recursive spider mode: don't consider
1413 non-existing robots.txt as a broken link, and use are_urls_equal
1414 instead of strcasecmp for referrer URLs comparison.
1416 * test.c: Call tests routines for are_urls_equal and
1419 2006-06-26 Hrvoje Niksic <hniksic@xemacs.org>
1421 * wget.h (wgint): Typedef to any 64-bit (or larger) type we can
1422 find, not necessarily off_t or long.
1424 2006-06-26 Hrvoje Niksic <hniksic@xemacs.org>
1426 * cmpt.c (strtoll): Check for overflow and underflow without
1427 relying on (technically) undefined behavior. Don't assume that
1428 strtoll_type is 64 bits wide.
1430 2006-06-21 Hrvoje Niksic <hniksic@xemacs.org>
1432 * utils.c (base64_encode): Cast void pointer to char * before
1435 2006-06-20 Hrvoje Niksic <hniksic@xemacs.org>
1437 * utils.c (base64_encode): Made TBL const.
1438 (base64_decode): Made the base64_char_to_value table const.
1440 2006-06-19 Hrvoje Niksic <hniksic@xemacs.org>
1442 * utils.c (base64_encode): Made the DATA pointer void * so the
1443 callers can pass it any kind of pointer (including both signed and
1444 unsigned char pointers).
1445 (base64_decode): Ditto for DEST.
1447 2006-06-19 Hrvoje Niksic <hniksic@xemacs.org>
1449 * utils.c (base64_encode): Would read past end of STR.
1450 Reported by rick@eckle.org.
1452 2006-06-13 Mauro Tortonesi <mauro@ferrara.linux.it>
1454 * options.h (struct options): Introduced member restrict_files_case to
1455 keep track of preferences on character case restrictions for
1458 * init.c: Modified defaults and cmd_spec_restrict_file_names to
1459 support character case restrictions for filenames. Added
1460 test_cmd_spec_restrict_file_names unit test.
1462 * url.c: Modified append_uri_pathel to support character case
1463 restrictions for filenames. Added test_append_uri_pathel unit test.
1465 * test.c: Added test_cmd_spec_restrict_file_names and
1466 test_append_uri_pathel to the list of unit tests to run.
1468 2006-06-12 Mauro Tortonesi <mauro@ferrara.linux.it>
1470 * retr.c (retrieve_from_file): Use retrieve_tree and automatically
1471 turn on opt.follow_ftp in case of recursive FTP retrieval through HTTP
1474 * main.c: Automatically turn on opt.follow_ftp in case of recursive
1475 FTP retrieval through HTTP proxy.
1477 2006-06-12 Tony Lewis <tlewis@exelana.com>
1479 * main.c: Improved CHEN Peng's patch by proposing a simpler logic.
1481 2006-06-12 CHEN Peng <chenpeng@alumni.nus.edu.sg>
1483 * main.c: Use retrieve_tree in case of recursive FTP retrieval through
1486 2006-05-25 Mauro Tortonesi <mauro@ferrara.linux.it>
1488 * convert.c: Added mechanisms to keep track broken links.
1492 * wget.h: Reordered and enumerated uerr_t constants.
1494 * recur.c: Fixes to support recursive spider mode.
1498 * main.c: Print broken links in case of recursive spider mode.
1500 * retr.c: Changed interface of retrieve_url.
1504 * ftp.c: Changed interface of ftp_loop.
1508 * res.c: Minor change to reflect changes in interface of retrieve_url.
1510 2006-05-18 Lawrence Jones <lawrence.jones@ugs.com>
1512 * ftp-ls.c (ftp_parse_unix_ls): Correct size parsing, add size
1513 and filename debugging output.
1515 2006-04-28 Mauro Tortonesi <mauro@ferrara.linux.it>
1517 * http.c: If Content-Disposition header is present, allow unique
1518 filename generation unless -nc is given. Permit to disable parsing of
1519 Content-Disposition header.
1521 * options.h: Added option --no-content-disposition to disable parsing
1522 of HTTP Content-Disposition header.
1528 2006-04-11 Hrvoje Niksic <hniksic@xemacs.org>
1530 * hash.c (TOLOWER): Wrap macro arg in parentheses.
1532 2006-04-08 Hrvoje Niksic <hniksic@xemacs.org>
1534 * http.c (parse_content_disposition): Doc fix.
1536 2006-03-15 Mauro Tortonesi <mauro@ferrara.linux.it>
1538 * utils.c: Restricted operational semantics of frontcmp and proclist
1539 from generic strings to directory names and them to subdir_p and
1540 dir_matches_p respectively. Applied George Ogata's one line patch to
1541 restrict algorithm of subdir_p to full directory name matching. Added
1542 testcases for subdir_p and dir_matches_p.
1544 * utils.h: Changed all frontcmp occurrences to subdir_p.
1548 * test.c: Changed type returned by test functions from char * to const
1549 char *. Added test_subdir_p and test_dir_matches_p to the list of
1552 * http.c (test_parse_content_disposition): Changed return type from
1553 char * to const char *.
1555 2006-03-14 Mauro Tortonesi <mauro@ferrara.linux.it>
1557 * recur.c (struct queue_element): Changed type of html_allowed member
1560 2006-03-09 Mauro Tortonesi <mauro@ferrara.linux.it>
1562 * ftp.c (ftp_list): Try `LIST -a' command first and revert to `LIST'
1565 2006-03-06 Hrvoje Niksic <hniksic@xemacs.org>
1567 * hash.c (TOLOWER): Fix definition when STANDALONE.
1568 Reported by Beni Serfaty.
1570 2006-03-02 Mauro Tortonesi <mauro@ferrara.linux.it>
1572 * http.c (http_loop): Fixed recursive HTTP retrieval.
1574 2006-02-28 Hrvoje Niksic <hniksic@xemacs.org>
1576 * http.c (extract_param): Declare extern so it can be used from
1578 (extract_param): Return error for empty name.
1580 2006-02-28 Hrvoje Niksic <hniksic@xemacs.org>
1582 * url.c (find_last_char): Define in terms of memrchr.
1584 * cmpt.c (memrchr): Define it on systems that don't have it.
1586 * http.c (extract_param): New function for parsing header values
1588 (parse_content_disposition): Use it. Don't allow slashes and
1589 backslashes in the file name.
1591 2006-02-27 Hrvoje Niksic <hniksic@xemacs.org>
1593 * url.c (path_simplify): Don't preserve ".." at beginning of path.
1594 Suggested by Frank McCown.
1596 2006-02-25 Hrvoje Niksic <hniksic@xemacs.org>
1598 * http.c (gethttp): Only use FILE.N.html if FILE.html exists.
1600 2006-02-09 Hrvoje Niksic <hniksic@xemacs.org>
1602 * mswindows.c (run_with_timeout): Made thread_hnd non-static.
1604 2006-02-05 Hrvoje Niksic <hniksic@xemacs.org>
1606 * retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of
1607 the specified wait period.
1609 2006-02-03 Hrvoje Niksic <hniksic@xemacs.org>
1611 * utils.c (number_to_string): Don't use sprintf for printing
1612 WGINT_MIN; simply divide n by 10 and defer printing the last
1614 (number_to_string): Removed the SPRINTF_WGINT macro.
1616 2006-02-03 Mauro Tortonesi <mauro@ferrara.linux.it>
1618 * http.c: Fixed support for Content-Disposition header.
1620 * test.c: Added test_parse_content_disposition to the list of unit
1623 2006-02-02 Hrvoje Niksic <hniksic@xemacs.org>
1625 * hash.c: Don't define countof if it's already defined.
1627 * hash.c: Obtain the definition of uintptr_t when standalone.
1629 2006-01-30 Mauro Tortonesi <mauro@ferrara.linux.it>
1631 * http.c: Changed output format. Removed excessively verbose debugging
1634 2005-12-07 Mauro Tortonesi <mauro@ferrara.linux.it>
1636 * http.c: Fixed pre-download verbose output which was broken by
1637 HTTP code refactoring.
1639 2005-11-23 Mauro Tortonesi <mauro@ferrara.linux.it>
1641 * http.c: Refactored HTTP code. If -O is not used, the new code
1642 delays the choice of the file name where the downloaded resource
1643 will be saved until the HTTP headers have been retrieved.
1644 Added support for Content-Disposition header.
1646 2005-11-19 Hrvoje Niksic <hniksic@xemacs.org>
1648 * hash.c (INVALID_PTR): Use uintptr_t instead of unsigned long.
1649 (hash_pointer): Don't assume a pointer fits in `unsigned long'.
1651 2005-11-02 Mauro Tortonesi <mauro@ferrara.linux.it>
1653 * Makefile.in: Removed support for unit testing (now it is in
1656 2005-10-27 Mauro Tortonesi <mauro@ferrara.linux.it>
1658 * Makefile.in: Added basic support for unit testing.
1664 2005-10-13 Daniel Stenberg <daniel@haxx.se>
1666 * http-ntlm.c (ntlm_output): Fixed buffer overflow vulnerability.
1668 2005-10-09 Russ Allbery <rra@stanford.edu>
1670 * snprintf.c: Remove round to round_int and pow10 to pow10_int, to
1671 avoid warnings from GCC 4.0.
1673 2005-10-05 Mauro Tortonesi <mauro@ferrara.linux.it>
1675 * retr.c: Changed semantics of no_proxy_match.
1677 2005-09-17 Hrvoje Niksic <hniksic@xemacs.org>
1679 * main.c (main): Don't print the summary if nothing has been downloaded.
1681 2005-09-17 Hrvoje Niksic <hniksic@xemacs.org>
1683 * retr.c (retr_rate): Rename parameter from MSECS to SECS since it
1684 no longer holds milliseconds.
1686 2005-09-01 Hrvoje Niksic <hniksic@xemacs.org>
1688 * progress.c: Introduce symbolic constants for "magic" values of
1689 0.2 and 0.9, REFRESH_INTERVAL and ETA_REFRESH_INTERVAL.
1691 2005-08-27 Hrvoje Niksic <hniksic@xemacs.org>
1693 * cmpt.c (strtoll): Correctly handle strtoll("0x", ptr, 0) and
1694 strtoll("0x<nonhexchar>", ptr, 0) -- in both cases *ptr must be
1695 set to the position of 'x', not after it.
1697 2005-08-27 Hrvoje Niksic <hniksic@xemacs.org>
1699 * hash.c (hash_table_map): Rename to hash_table_for_each and
1701 Document the meaning of the callback's return value.
1702 (hash_table_iterate): New function.
1703 (hash_table_iter_next): Likewise.
1704 Update most places that used hash_table_for_each to use the
1705 iteration, which doesn't require a temporary function with
1706 explicit state management.
1708 2005-08-26 Albert Chin <wget@mlists.thewrittenword.com>
1710 * Makefile.in: Use @datadir@. Define localedir as $(datadir)/locale.
1712 2005-08-26 Jeremy Shapiro <jnshapiro@gmail.com>
1714 * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY.
1716 2005-08-23 Hrvoje Niksic <hniksic@xemacs.org>
1718 * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA.
1720 2005-08-12 Hrvoje Niksic <hniksic@xemacs.org>
1722 * wget.h: Renamed strtoll_return to strtoll_type.
1724 2005-08-11 Hrvoje Niksic <hniksic@xemacs.org>
1726 * progress.c (eta_to_human_short): Switch to days when printing
1727 more than 48h rather than 100h. (It's not immediately apparent
1728 how many days there are in 83h.)
1730 2005-08-11 Hrvoje Niksic <hniksic@xemacs.org>
1732 * cmpt.c (strtoll): Define it if missing on the system and if Wget
1735 * mswindows.c (str_to_int64): Move to cmpt.c and rename to strtoll.
1737 2005-08-10 Hrvoje Niksic <hniksic@xemacs.org>
1739 * host.c (print_address): Always use inet_ntop when IPv6 is
1742 * host.h (ip_address): Simplify the data union.
1744 2005-08-09 Hrvoje Niksic <hniksic@xemacs.org>
1746 * mswindows.c (inet_ntop): Also handle IPv4 addresses for
1749 2005-08-09 Hrvoje Niksic <hniksic@xemacs.org>
1751 * http.c (gethttp): Don't read more than the amount of data
1752 specified by the content-length header.
1754 2005-08-09 Vasil Dimov <vd@datamax.bg>
1756 * ftp.c (getftp): Don't free RESPLINE if ftp_response returns a
1757 status other than FTPOK.
1759 2005-08-04 Giuseppe Bonacci <g.bonacci@libero.it>
1761 * ftp-ls.c (ftp_parse_unix_ls): Remember the position of the
1762 previous token instead of backtracking back to it.
1764 2005-07-08 Gisle Vanem <giva@bgnett.no>
1766 * mswindows.h: Include process.h to get getpid() declaration.
1768 2005-07-08 Hrvoje Niksic <hniksic@xemacs.org>
1770 * utils.c (aprintf): Use vasprintf where available.
1772 2005-07-08 Hrvoje Niksic <hniksic@xemacs.org>
1774 * url.c (rewrite_shorthand_url): Simplify code using aprintf and
1777 2005-07-07 Hrvoje Niksic <hniksic@xemacs.org>
1779 * gnutls.c (ssl_check_certificate): Check for the validity of the
1780 presented X509 certificate.
1782 2005-07-07 Hrvoje Niksic <hniksic@xemacs.org>
1784 * openssl.c (ssl_check_certificate): Print custom error messages
1785 for frequent X509 certificate problems.
1787 2005-07-07 Hrvoje Niksic <hniksic@xemacs.org>
1789 * mswindows.h: Define an alias for stat and fstat, as requested by
1791 (gai_strerror): Define to windows_strerror if NEED_GAI_STRERROR is
1794 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
1796 * mswindows.h: Use strtoll where available.
1798 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
1800 * sysdep.h: Add a full declaration of fnmatch.h.
1802 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
1804 * utils.c: Unconditionally include <setjmp.h>.
1806 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
1808 * utils.c (fnmatch_nocase): New function.
1809 (proclist): Use it instead of fnmatch when opt.ignore_case is
1811 (in_acclist): Respect opt.ignore_case.
1812 (frontcmp): Respect opt.ignore_case.
1814 * options.h (struct options): New flag opt.ignore_case.
1816 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
1818 * ptimer.c: Measure time in seconds rather than milliseconds.
1819 Adjusted all callers.
1821 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
1823 * http.c (gethttp): When freeing MESSAGE, take into account that
1826 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
1828 * cmpt.c (timegm): Handle years after 2099.
1830 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
1832 * cmpt.c (timegm): Remove unused variable.
1834 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
1836 * cmpt.c (timegm): Don't call mktime; simply count the seconds
1837 between 1970-01-01 and the specified date.
1839 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
1841 * wget.h (or): Define HAVE_SSL when either HAVE_OPENSSL or
1842 HAVE_GNUTLS are defined.
1844 * gnutls.c: New file.
1846 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
1848 * http.c (gethttp): Don't print the request write error message
1851 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
1853 * openssl.c (openssl_errstr): Instead of always using a large
1854 static buffer, only allocate the error string when there is an
1857 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
1859 * xmalloc.c (debugging_free): Prefix hex pointer value with "0x"
1862 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
1864 * utils.c (NEXT_BASE64_CHAR): Rename to NEXT_CHAR and simplify to
1865 get the next non-whitespace character.
1867 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
1869 * utils.c (base64_decode): Don't silently tolerate non-base64
1870 non-white-space characters in the base64 stream.
1872 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
1874 * connect.c (LAZY_RETRIEVE_INFO): Make last_tick unsigned to match
1875 transport_map_modified_tick.
1877 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
1879 * config-post.h (alloca): Updated declaration to not enumerate all
1882 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
1884 * openssl.c (openssl_errstr): Separate error messages with "; ".
1886 2005-07-03 Hrvoje Niksic <hniksic@xemacs.org>
1888 * ftp.c (getftp): Ditto.
1890 * http.c (gethttp): Use fd_errstr.
1892 * connect.c (fd_register_transport): Restructure parameters to
1893 include only a single structure that describes transport
1896 * openssl.c (openssl_errstr): New function: dump SSL error strings
1897 into a static buffer and return a pointer to the buffer.
1899 * connect.c (fd_errstr): New function; returns transport-specific
1900 error message, or strerror(errno) if transport doesn't supply one.
1902 2005-07-03 Hrvoje Niksic <hniksic@xemacs.org>
1904 * mswindows.h: Also wrap accept() and listen().
1906 2005-07-03 Hrvoje Niksic <hniksic@xemacs.org>
1908 * url.c (path_end): Skip separators appropriate for the scheme.
1909 (strpbrk_or_eos): Remove gcc-specific version, as the optimization
1910 it tried to perform no longer applies.
1912 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
1914 * host.c: Don't include "connect.h" now that we no longer have
1917 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
1919 * host.c: Remove extraneous definition of netdb.h.
1921 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
1923 * http.c (gethttp): Skip error message body in the keep-alive
1926 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
1928 * url.c (url_parse): Would crash when parsing fragments. Support
1929 fragments for FTP URLs too.
1931 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
1933 * version.c: Don't use "cvs" in version name, since we're not
1936 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
1938 * progress.c (create_image): Ditto.
1940 * retr.c (retr_rate): Display smaller rate numbers with greater
1943 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
1945 * http.c (response_head_terminator): Minor optimization.
1947 * retr.c (fd_read_hunk): Call terminator with pointer to the start
1948 of the data and the pointer to the current data. Changed all
1951 2005-07-01 Hrvoje Niksic <hniksic@xemacs.org>
1953 * url.c (url_parse): Make sure u->params is not initialized for
1955 (url_parse): Don't crash on garbage following []-delimited IPv6
1958 2005-07-01 Hrvoje Niksic <hniksic@xemacs.org>
1960 * main.c (print_help): Don't refer to the non-existent -nr in
1961 description of --mirror.
1963 2005-06-30 Hrvoje Niksic <hniksic@xemacs.org>
1965 * host.c (pretty_print_address): Renamed to just print_address.
1966 Clarify documentation.
1968 2005-06-30 Hrvoje Niksic <hniksic@xemacs.org>
1970 * http.c (gethttp): Explicitly document the different cases when
1971 generating the Host header.
1973 2005-06-30 Hrvoje Niksic <hniksic@xemacs.org>
1975 * host.c (pretty_print_address): Handle error result from
1978 2005-06-30 Gisle Vanem <giva@bgnett.no>
1980 * mswindows.c (inet_ntop): New function. Print IPv6 addresses
1981 using WSAAddressToString.
1983 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
1985 * progress.c (dot_update): Remove unused variable row_qty.
1987 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
1989 * main.c: Check for both SIGHUP and SIGUSR1 before using them.
1991 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
1993 * utils.c: Unconditionally include locale.h.
1995 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
1997 * ptimer.c: Include sys/time.h to get struct timeval.
1999 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
2001 * wget.h: Remove obsolete definition of with_thousand_seps_sum.
2003 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
2005 * gnu-md5.h: Unconditionally include limits.h.
2007 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
2009 * utils.c (random_number): Use lrand48 if available.
2010 (random_float): Use drand48 if available.
2012 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
2014 * main.c (secs_to_human_time): Use print_decimal when printing
2015 total download time in seconds.
2017 * progress.c (print_row_stats): Use it to print total download
2018 time at the end of the download.
2019 (create_image): Ditto.
2021 * utils.c (print_decimal): New function; print small decimal
2022 numbers with more precision than large ones.
2024 * progress.c (print_row_stats): New function. Print ETA after the
2025 download rate at the end of each row.
2027 2005-06-28 Hrvoje Niksic <hniksic@xemacs.org>
2029 * init.c (parse_line): Check for alphanumerics.
2031 2005-06-28 Hrvoje Niksic <hniksic@xemacs.org>
2033 * (dot_create): Remove unnecessary casts.
2035 2005-06-28 Hrvoje Niksic <hniksic@xemacs.org>
2037 * ftp.c (getftp): Delete trailing newlines from LIST output so
2038 lines don't come out with trailing \015\012 with -S.
2040 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2042 * mswindows.h: Remove superfluous includes.
2044 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2046 * config-post.h (alloca): Amend alloca declaration to take care of
2047 all Win32 compilers, not just MSVC and MinGW.
2049 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2051 * utils.c (get_grouping_data): Force separator to "." rather than
2052 " " when "," is taken.
2054 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2056 * wget.h (PTR_FORMAT): Cast the result of sizeof to int before
2057 passing it to printf's %*.
2059 * retr.h: Declare output_stream and output_stream_regular.
2061 * ftp.h: Declare ftp_last_respline.
2063 * convert.h: Declare dl_url_file_map.
2067 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2069 * cookies.c: Make cookies_now static.
2071 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2073 * utils.c (human_readable): Remove intermediary cast to long; MSVC
2074 has problems casting *unsigned* __int64 to double.
2076 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2078 * sysdep.h: Use the system-provided fnmatch by default.
2080 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2082 * http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c.
2083 Don't compile it if GNU timegm is available.
2084 (http_atotm): Use timegm.
2086 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2088 * http.c (http_atotm): Correctly query the old locale value.
2090 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2092 * config-post.h (alloca): Don't #define alloca under MinGW32,
2093 which defines it in malloc.h, included from mswindows.h.
2095 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2097 * utils.c (get_grouping_data): Force the use of separators in C
2100 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2102 * main.c (i18n_initialize): Set all locale categories.
2104 * http.c (http_atotm): Temporarily set locale to "C".
2106 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2108 * http.c (gethttp): Improve "POST data file missing" error
2111 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2113 * progress.c (set_progress_implementation): Type COLON as const
2116 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
2118 * utils.c (with_thousand_seps): Handle negative numbers.
2120 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
2122 * progress.c (create_image): Mark the "eta" string for translation.
2124 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
2126 * html-url.c (get_urls_file): Don't explicitly set entry->next to
2127 NULL since entry is already zeroed out.
2129 2005-06-26 Gisle Vanem <giva@bgnett.no>
2131 * mswindows.h: Define gai_strerror under MinGW.
2133 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
2135 * utils.c (with_thousand_seps): Correctly implement thousand seps
2136 consisting of more than one character.
2138 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
2140 * main.c (secs_to_human_time): Ditto.
2142 * progress.c (create_image): Print more exact duration of very
2145 * main.c (secs_to_human_time): Don't translate time suffixes "h",
2146 "m", and "s", which are not strictly SI, but are "accepted for use
2148 (secs_to_human_time): Print really small intervals as 0s, not
2151 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
2153 * config-post.h: Replace the alloca declaration with the one from
2154 the latest Autoconf manual. This should remove a warning with GCC
2157 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
2159 * ftp.c (getftp): Always invoke SIZE, not only when continuing a
2162 * main.c (main): Ditto here.
2164 * progress.c (create_image): When the download is finished, print
2167 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
2169 * main.c (main): Print the downloaded and quota amounts with the
2170 "human_readable" function.
2172 * ftp.c (print_length): Ditto.
2174 * http.c (gethttp): Don't display thousand separators.
2176 * utils.c (with_thousand_seps): Rewritten to respect locale
2177 settings and to be type size agnostic.
2179 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
2181 * utils.c (human_readable): Divide with 1024 instead of shifting
2182 so the operation can work with non-integer N.
2184 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
2186 * progress.c (eta_to_human): New logic for more human-readable
2189 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
2191 * utils.c (with_thousand_seps_sum): Decrease buffer size so it
2192 cannot overrun add_thousand_seps's buffer.
2194 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
2196 * utils.c (SPRINTF_WGINT): The correct format is %I64d, not just
2199 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
2201 * http.c (http_loop): Don't warn about wildcards in HTTP URLs if
2202 globbing isn't requested in the first place.
2204 * retr.c (retrieve_url): Temporarily turn off globbing when
2205 processing HTTP->FTP redirects.
2207 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
2209 * utils.c (with_thousand_seps_sum): Now defined only if
2210 SUM_SIZE_INT is double.
2212 * wget.h (SUM_SIZE_INT): Instead of bothering with long, long
2213 long, __int64, and friends, simply either use wgint or double, end
2214 of story. Since we know how to print either, we no longer need
2217 * sysdeps.h (LARGE_INT): Renamed to SUM_SIZE_INT to better reflect
2218 its intent, and moved to wget.h.
2220 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
2222 * Makefile.in: No need to clean .libs.
2224 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
2226 * cookies.c (parse_set_cookies): Cast pointer subtraction to int
2227 before using it with %d; AIX compiler warns on this.
2228 Reported by Jens Schleusener.
2230 2005-06-24 Hrvoje Niksic <hniksic@xemacs.org>
2232 * http.c (gethttp): Don't prepend / here.
2234 * cookies.c (cookie_handle_set_cookie): Prepend / to PATH.
2235 (cookie_header): Ditto.
2237 2005-06-24 Hrvoje Niksic <hniksic@xemacs.org>
2239 * init.c: opt.verbose must be declared as int.
2241 2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
2243 * cmpt.c (strpbrk): Removed.
2247 2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
2249 * utils.c (read_file): Ditto.
2251 * main.c (main): Use struct_fstat.
2253 * mswindows.h (struct_fstat): Define a struct_fstat to deal with
2254 the fact that Borland 5.5 has 64-bit stat, but not 64-bit fstat!
2256 2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
2258 * sysdep.h: Remove code that deals with Watcom.
2260 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2262 * all: Use bool instead of int and false/true instead of 0/non-0
2263 for boolean variables and values.
2265 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2267 * sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf.
2269 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2271 * init.c (cmd_lockable_boolean): Removed.
2273 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2275 * cookies.c (struct cookie): Use 1-bit bitfields for booleans
2276 which makes the structure takes less space at no cost in
2279 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2281 * Makefile.in ($(OBJ)): Add the config.h dependency.
2283 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2285 * openssl.c, connect.c, host.c: Replace instances of #ifdef
2286 ENABLE_DEBUG if (opt.debug) {...} #endif with IF_DEBUG {...}.
2288 * main.c: Rename the IF_DEBUG defined here to WHEN_DEBUG.
2290 * wget.h (IF_DEBUG): New macro.
2291 (DEBUGP): Define in terms of IF_DEBUG.
2293 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2295 * http.c (gethttp): Only handle --set-cookies (and assert that
2296 cookie jar exists) if opt.cookies is true. Failure to do so
2297 triggered the assert when --no-cookies was used and the server
2298 sent a Set-Cookie header. Ouch!
2300 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2302 * connect.c (select_fd): Expect select() to exist.
2304 * utils.c (xsleep): Always use select() as sleep fallback on
2305 non-Windows platforms.
2307 * ptimer.c: Delete the implementation of PTIMER_TIME.
2309 * main.c: Assume existence of signal(), test for different signal
2312 * cmpt.c: Better document reasons why certain functions are
2315 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
2317 * Makefile.in: Remove the manually maintained dependency list;
2318 make all object files depend on every header.
2320 2005-06-20 Hrvoje Niksic <hniksic@xemacs.org>
2322 * hash.c: Rename "mapping" to "cell" to avoid confusion with the
2323 term "mapping" (or "map") sometimes being used for the entire hash
2324 table. Also rename "non-empty" to "occupied" for easier reading
2325 of if (!NON_EMPTY (...)) ... .
2327 2005-06-20 Hrvoje Niksic <hniksic@xemacs.org>
2329 * main.c, ptimer.c, sysdep.h, utils.c: Use #elif to simplify reading of
2330 chained if-else-else-else-... statements.
2332 2005-06-20 Hrvoje Niksic <hniksic@xemacs.org>
2334 * all: Return type of signal handlers is `void'. Include signal.h
2337 * all: Don't explicitly cast values returned by malloc. We no
2338 longer support ancient compilers that don't declare malloc, and we
2339 never supported C++ builds.
2341 2005-06-19 Hrvoje Niksic <hniksic@xemacs.org>
2343 * all: Don't declare errno. Include both time.h and sys/time.h,
2344 as long as sys/time.h exists. Don't dereference function pointers
2345 when invoking the functions they point to.
2347 * cmpt.c (memmove): Remove function mandated by C89.
2351 * all: Undo the K&R-ization changes from 2005-05-03.
2353 * all: Remove support for K&R compilers: use C89 function
2354 declarations, remove definition of PARAMS, remove support for
2355 varargs, and remove ansi2knr. Assume the presence of time.h,
2356 string.h, and other headers mandated by C89.
2358 2005-06-19 Hrvoje Niksic <hniksic@xemacs.org>
2360 * init.c (cmd_lockable_boolean): Don't recognize literal "2" and
2361 "-1" values; unlike 0 and 1, those should never be exposed to the
2362 user. Update the error message to be more self-consistent, as
2363 proposed by Benno Schulenberg.
2365 2005-06-18 Hrvoje Niksic <hniksic@xemacs.org>
2367 * http.c (gethttp): Don't free "head" before using it to save
2370 2005-06-18 Hrvoje Niksic <hniksic@xemacs.org>
2372 * http.c (gethttp): When -E is in use, check for file existence
2373 after appending ".html" to the name and modify the file name if
2376 2005-06-17 Hrvoje Niksic <hniksic@xemacs.org>
2378 * connect.c (socket_has_inet6): Removed.
2380 * host.c (lookup_host): Don't use the AI_ADDRCONFIG getaddrinfo
2383 2005-06-16 Hrvoje Niksic <hniksic@xemacs.org>
2385 * init.c (cmd_lockable_boolean): Improve the error message so it
2386 lists the more useful values first.
2388 2005-06-15 Hrvoje Niksic <hniksic@xemacs.org>
2390 * http.c (gethttp): Also report the system error when the POST
2391 data file is missing.
2393 2005-06-15 Benno Schulenberg <benno@nietvergeten.nl>
2395 * ftp.c, http.c, connect.c, cookies.c, html-url.c, init.c, res.c:
2396 Gettext-ize messages that were previously missed.
2398 2005-06-15 Hrvoje Niksic <hniksic@xemacs.org>
2400 * host.h (ip_address): Remove the trailing comma from the type
2401 enum in the no-IPv6 case.
2403 * main.c (struct cmdline_option): Remove the trailing comma from
2406 Reported by Jens Schleusener.
2408 2005-05-30 Hrvoje Niksic <hniksic@xemacs.org>
2410 * url.c (strpbrk_or_eos): Check for a recent GCC version before
2411 using the statement-as-expression extension.
2413 2005-05-30 Hrvoje Niksic <hniksic@xemacs.org>
2415 * http.c (gethttp): Don't attempt to "skip short body" if we're
2416 issuing a HEAD request (in which case the response head is not
2417 followed by a body).
2419 2005-05-30 Hrvoje Niksic <hniksic@xemacs.org>
2421 * init.c (cmd_spec_header): Don't split the string along the
2422 commas using cmd_vector; just append the new value using
2425 * utils.c (vec_append): New function.
2427 2005-05-27 Andreas Beckmann <debian@abeckmann.de>
2429 * html-url.c (tag_handle_link): Mark the content from the <link
2430 src="..."> tag as expecting HTML.
2432 2005-05-24 Hrvoje Niksic <hniksic@xemacs.org>
2434 * http.c (http_atotm): Document the origin of the "cookie date"
2437 2005-05-21 Hrvoje Niksic <hniksic@xemacs.org>
2439 * init.c (setval_internal): Report exact command name alongside
2442 2005-05-18 Hrvoje Niksic <hniksic@xemacs.org>
2444 * cookies.c (update_cookie_field): Explicitly cast -1 to time_t to
2445 cope with systems where time_t is unsigned.
2447 * cookies.c: Remove unnecessary casts to time_t from values
2448 already of that type.
2450 2005-05-17 Hrvoje Niksic <hniksic@xemacs.org>
2452 * ftp.c (ftp_loop_internal): Same here.
2454 * http.c (http_loop): Don't clobber the file when -c is specified
2455 and the first attempt to retrieve the file fails.
2457 2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
2459 * openssl.c (ssl_check_certificate): Print all issues with a
2462 2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
2464 * ftp-basic.c: Don't xfree() the line returned by ftp_response if
2465 the returned code is not FTPOK.
2467 2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
2469 * init.c (cleanup): Don't free the non-existent opt.ftp_acc. Free
2470 the SSL-related stuff.
2472 2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
2474 * ftp.c (print_length): Consistently print \n at end of the
2477 2005-05-14 Hrvoje Niksic <hniksic@xemacs.org>
2479 * openssl.c (ssl_connect): Announce the beginning and the end of
2480 the SSL handshake when in debug mode.
2482 * wget.h (PTR_FORMAT): New macro for easier printing of pointer
2483 values. Use %0*lx along with PTR_FORMAT instead of %p.
2485 2005-05-14 Hrvoje Niksic <hniksic@xemacs.org>
2487 * http.c (gethttp): Would forget to close the connection when
2488 keep_alive was not used.
2490 2005-05-13 Hrvoje Niksic <hniksic@xemacs.org>
2492 * openssl.c (pattern_match): Document the code that decides
2493 whether "*" matches ".".
2495 2005-05-12 Hrvoje Niksic <hniksic@xemacs.org>
2497 * ftp-ls.c (ftp_index): Use %d to print the port number, which is
2499 From Steven M. Schweda's VMS patches.
2501 2005-05-12 Hrvoje Niksic <hniksic@xemacs.org>
2503 * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to
2504 "ftp://https//host" when SSL is not used.
2506 2005-05-11 Hrvoje Niksic <hniksic@xemacs.org>
2508 * openssl.c (ssl_check_server_identity): Renamed to
2509 ssl_check_certificate because it does more than just checking the
2511 (ssl_check_certificate): Tell the user about
2512 --no-check-certificate.
2514 2005-05-11 Hrvoje Niksic <hniksic@xemacs.org>
2516 * openssl.c (ssl_init): Always use SSL_VERIFY_NONE, so that the
2517 handshake finishes even if the certificate is invalid. That way
2518 ssl_check_server_identity can provide better diagnostics on why
2519 the verification failed.
2521 2005-05-11 Hrvoje Niksic <hniksic@xemacs.org>
2523 * openssl.c (pattern_match): New function.
2524 (ssl_check_server_identity): Treat peer certificate common name as
2527 2005-05-10 Hrvoje Niksic <hniksic@xemacs.org>
2529 * openssl.c (ssl_check_server_identity): Print certificate subject
2532 2005-05-10 Hrvoje Niksic <hniksic@xemacs.org>
2534 * res.c (res_register_specs): Correctly pass pointers to
2535 hash_table_get_pair.
2537 2005-05-10 Hrvoje Niksic <hniksic@xemacs.org>
2539 * http.c (gethttp): Call ssl_check_server_identity.
2541 * openssl.c (ssl_check_server_identity): New function, verifies
2542 that the host name in the certificate matches the actual host
2544 (verify_cert_callback): Removed, since it didn't do anything
2545 except returning the preverify_ok argument.
2547 * connect.c (fd_transport_context): Allow retrieval of the context
2548 pointer registered with fd_register_transport.
2550 2005-05-09 Hrvoje Niksic <hniksic@xemacs.org>
2552 * openssl.c (verify_cert_callback): Renamed from verify_callback.
2553 Always return the received "ok" value. Print the X509 name in
2555 (ssl_init): Enable partial writes in SSL context.
2557 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
2559 * http.c (http_loop): Check for wildcards in the URL path
2560 component, not in the whole URL.
2562 * ftp.c (ftp_loop): Check for wildcards in URL path before
2563 unescaping, so the users can escape globbing metacharacters with %
2566 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
2568 * init.c (run_command): Correctly interpret the return value of
2570 (commands): Re-alphabetize.
2572 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
2574 * netrc.c (parse_netrc): Explicitly check for assignment != NULL
2575 to silence warning from Borland C.
2577 * url.c (sync_path): Don't unnecessarily increment p.
2578 (url_parse): Don't unnecessarily set url_encode to NULL just
2579 prior to return from the function.
2581 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
2583 * log.c (escnonprint_internal): Place variable declarations
2584 before other statements.
2586 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
2588 * html-url.c: Include recur.h.
2590 * http.c (request_new): Define as accepting no args.
2592 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
2594 * url.c (strpbrk_or_eos): Made inline. Use strchr(s, '\0') for
2595 finding the NUL char position.
2597 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
2599 * url.c (decide_copy_method): Renamed to char_needs_escaping.
2600 Since it now returns only two possible values, change it to return
2603 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
2605 * ftp-basic.c (ftp_request): Prevent newlines in VALUE causing
2606 inadvertent sending of multiple FTP commands.
2608 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
2610 * url.c (decide_copy_method): Never cause reencode_escapes to
2611 decode % escapes; it is too intrusive and breaks some servers.
2613 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
2615 * http.c (gethttp): When tunnelling SSL traffic over proxy with
2616 CONNECT, we're really talking to the remote server directly.
2617 Because of this, the request-line argument must be the URL path
2618 rather than the whole URL, as it would be when using regular
2620 Reported by Charles Lane.
2622 2005-05-06 Hrvoje Niksic <hniksic@xemacs.org>
2624 * init.c (cmd_spec_useragent): Allow empty User-Agent.
2626 * http.c (gethttp): Don't print "unknown authentication scheme"
2627 for failed Basic authentication.
2628 (SET_USER_AGENT): Don't set user-agent if opt.useragent is empty.
2629 (gethttp): Use alloca for allocation of www_authenticate.
2631 2005-05-06 Hrvoje Niksic <hniksic@xemacs.org>
2633 * main.c (print_help): Fix wording of --secure-protocol help text.
2635 2005-05-06 Hrvoje Niksic <hniksic@xemacs.org>
2637 * cmpt.c (strstr): Updated from glibc 2.3.5.
2639 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2641 * http.c (http_atotm): Zero out the whole struct tm being passed
2644 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2646 * main.c (main): Propagate option name to setoptval.
2648 * init.c (setoptval): Accept another argument, OPTNAME. Propagate
2649 that argument as the option name independently of the actual
2650 command, determined by command_by_name(com).
2652 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2654 * init.c (parse_line): Make the return value indicate whether
2655 there was a syntax error or a setter failed.
2656 (run_wgetrc): Return an indication on whether an error has been
2658 (initialize): Abort if there have been errors running either
2661 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2663 * log.c (copy_and_escape): Slightly reduce code repetition between
2666 2005-05-05 Charles C.Fu <ccwf@bacchus.com>
2668 * utils.c (proclist): Strip leading slash when calling fnmatch
2669 too, otherwise wildcard comparisons always fail.
2671 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2673 * utils.c (touch): Set access time to current time.
2675 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2677 * url.c (url_unescape): Don't unescape %00, it effectively
2678 truncates the string.
2680 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2682 * log.c (copy_and_escape): Replace the FOR_URI argument with a
2683 slightly more general mechanism for specifying different kinds of
2686 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2688 * ftp-basic.c (ftp_response): Fix printing FTP server response.
2690 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
2692 * retr.c (limit_bandwidth_reset): Reset sleep_adjust.
2693 (limit_bandwidth): Don't allow huge "adjustment" values that
2694 result from being suspended for a while.
2696 2005-05-04 Hrvoje Niksic <hniksic@xemacs.org>
2698 * wget.h: If gettext was found but libtintl.h wasn't, declare
2699 gettext's return type to avoid type mismatches.
2701 2005-05-03 Hrvoje Niksic <hniksic@xemacs.org>
2703 * url.c (url_parse): Rename label `error' to avoid conflict with
2706 * retr.c (fd_read_body): Rename label `out' to avoid conflict with
2708 (fd_read_hunk): Use explicit double constant.
2709 (retrieve_from_file): Don't use string concatenation.
2710 (sleep_between_retrievals): Make sure xsleep is called with a
2712 (no_proxy_match): Define as static, like it is declared.
2714 * progress.c (bar_create): Use 0.0 instead of 0 because K&R
2715 compilers can't automatically promote it.
2717 * http-ntlm.c (ntlm_output): Replace \xHH sequences with \OOO for
2718 the sake of old compilers.
2720 * ftp.c (ftp_loop_internal): Don't use string concatenation.
2722 * http.c (request_send): Use explicit double constants when
2723 calling fd_read and fd_write.
2726 (skip_short_body): Ditto.
2728 * ftp-basic.c: When calling fd_write, specify the last argument as
2729 a `double' constant for the sake of K&R compilers which don't see
2730 the prototype and therefore can't promote it to double
2733 * cookies.c (cookie_jar_load): Rename abort label to abort_cookie
2734 to avoid name conflict in K&R compilers.
2736 2005-04-29 Hrvoje Niksic <hniksic@xemacs.org>
2738 * ptimer.c (posix_init): Since we allow _POSIX_MONOTONIC_CLOCK==0,
2739 it is not enough to check for _POSIX_MONOTONIC_CLOCK-0, we must
2740 also check for defined(_POSIX_MONOTONIC_CLOCK).
2742 2005-04-28 Hrvoje Niksic <hniksic@xemacs.org>
2744 * ftp.c, hash.c, connect.c, host.c, http.c: Remove unreached code,
2745 such as "break" following return or abort.
2747 2005-04-28 Hrvoje Niksic <hniksic@xemacs.org>
2749 * init.c (commands): Wrap the use of opt.random_file in #ifdef
2752 2005-04-28 Hrvoje Niksic <hniksic@xemacs.org>
2754 * http.c (gethttp): Correctly set the user agent.
2756 2005-04-27 Hrvoje Niksic <hniksic@xemacs.org>
2758 * init.c (cmd_spec_useragent): Free the old value of
2759 opt.useragent before setting the new one.
2761 2005-04-27 Mauro Tortonesi <mauro@ferrara.linux.it>
2763 * main.c: Map --ftp-password, --http-password and --proxy-password to
2764 the new ftppassword, httppassword and proxypassword commands
2765 respectively. Document the --user and --password options in the help
2768 2005-04-27 Mauro Tortonesi <mauro@ferrara.linux.it>
2770 * ftp.c: Add support for --user and --password.
2772 * http.c: Add support for --user and --password.
2774 * init.c: Deprecated ftppasswd, httppasswd, login, passwd and
2775 proxypasswd commands. Added ftppassword, ftpuser, httppassword,
2776 password, proxypassword and user commands.
2778 * main.c: Renamed --ftp-passwd to --ftp-password. Added --ftp-user,
2779 --http-password, --password, --proxy-password and --user. Deprecated
2780 --http-passwd and --proxy-passwd. Added documentation for new options
2781 and removed documentation for deprecated options in the help string.
2783 * options.h (struct options): Added user and passwd members to handle
2784 --user and --password respectively. Renamed ftp_acc and ftp_pass
2785 members to ftp_user and ftp_passwd for consistency.
2787 2005-04-27 Hrvoje Niksic <hniksic@xemacs.org>
2789 * main.c (print_help): Advertise "DER", not "ASN1".
2791 2005-04-27 Hrvoje Niksic <hniksic@xemacs.org>
2793 * openssl.c (init_prng): Disable the weak random seed by default.
2795 * http.c (gethttp): Simplify SSL initialization; disable SSL when
2796 anything goes wrong with the initialization.
2798 * options.h (struct options): New option opt.random_file.
2800 2005-04-27 Hrvoje Niksic <hniksic@xemacs.org>
2802 * init.c: Wrap private key commands in IF_SSL.
2804 2005-04-27 Hrvoje Niksic <hniksic@xemacs.org>
2806 * openssl.c (ssl_init): Ditto.
2808 * options.h (struct options): Allow separate specification of key
2809 type and certificate type.
2811 * init.c (cmd_spec_cert_type): Provide a "der" synonym for "asn1"
2812 certificate encoding.
2814 2005-04-26 Hrvoje Niksic <hniksic@xemacs.org>
2816 * openssl.c: Renamed "gen_sslfunc.c" to "openssl.c" and
2817 "gen_sslfunc.h" to "openssl.h". This reflects the intent of
2818 openssl.c encapsulating the OpenSSL-specific code.
2820 2005-04-26 Hrvoje Niksic <hniksic@xemacs.org>
2822 * init.c: Renamed "closure" (a synonym for context in some
2823 cultures) to "place", which more accurately reflects the usage.
2825 2005-04-26 Hrvoje Niksic <hniksic@xemacs.org>
2827 * gen_sslfunc.c (ssl_init): Use default locations for loading the
2828 certificate bundles.
2829 (ssl_init_prng): Disable the cryptographically weak PRNG
2830 initialization fallback.
2832 * init.c: Renamed SSL command-line arguments and wgetrc commands.
2833 (defaults): Check the server certificate by default.
2835 2005-04-26 Hrvoje Niksic <hniksic@xemacs.org>
2837 * cookies.c (cookie_handle_set_cookie): Delete the part of the
2838 path after the trailing slash.
2840 * http.c (gethttp): Call cookie_handle_set_cookie with path that
2843 2005-04-26 Hrvoje Niksic <hniksic@xemacs.org>
2845 * http.c (gethttp): Call skip_short_body only if keep_alive is in
2847 (gethttp): Send the User-Agent header with the CONNECT request as
2850 2005-04-25 Hrvoje Niksic <hniksic@xemacs.org>
2852 * main.c (option_data): Removed support for the undocumented flag
2855 2005-04-25 Hrvoje Niksic <hniksic@xemacs.org>
2857 * main.c (option_data): Don't treat -Y as a boolean switch; treat
2858 it as a value switch instead, so "-Y off" continues to work.
2860 2005-04-24 Hrvoje Niksic <hniksic@xemacs.org>
2862 * utils.c (aprintf): Delete unreachable statement.
2864 2005-04-24 Hrvoje Niksic <hniksic@xemacs.org>
2866 * host.c (cmp_prefer_ipv4): New function.
2867 (cmp_prefer_ipv6): New function.
2868 (lookup_host): Use the appropriate comparator according to
2871 * init.c: New option prefer_family.
2873 * host.c (is_valid_ipv6_address): Spell NS_* constants in lower
2874 case to avoid clash with system headers.
2875 (lookup_host): Reorder the addresses so that IPv4 ones come first.
2877 * utils.c (stable_sort): New function.
2879 2005-04-24 Hrvoje Niksic <hniksic@xemacs.org>
2881 * connect.c (retryable_socket_connect_error): Return 0 for
2882 ENETUNREACH and EHOSTUNREACH.
2884 2005-04-23 Hrvoje Niksic <hniksic@xemacs.org>
2886 * cmpt.c: Reenable the memmove implementation for systems that
2889 * http.c (gethttp): Store the "authorized" state of the persistent
2891 (request_remove_header): New function.
2892 (gethttp): Don't send the "Basic" authentication if the connection
2893 is already authorized.
2895 2005-04-23 Hrvoje Niksic <hniksic@xemacs.org>
2897 * utils.c (base64_encode): Treat input as unsigned chars.
2898 Required for correct encoding of binary stuff.
2900 2005-04-23 Hrvoje Niksic <hniksic@xemacs.org>
2902 * http-ntlm.c: Format the function definitions in an
2903 ansi2knr-friendly fashion.
2905 2005-04-22 Hrvoje Niksic <hniksic@xemacs.org>
2907 * http.c (gethttp): Handle multiple WWW-Authentication headers,
2908 only one of which is recognized. Those are sent by IIS with NTLM
2910 (create_authorization_line): Propagate information whether
2911 authorization is finished.
2912 (gethttp): Only stop authorization when it's really finished, not
2913 after fixed two steps.
2915 2005-04-21 Hrvoje Niksic <hniksic@xemacs.org>
2917 * gen_sslfunc.c (ssl_init): Fix warning message text; mark the
2918 message as translatable.
2920 2005-04-21 Hrvoje Niksic <hniksic@xemacs.org>
2922 * main.c (print_help): Print the EGD option outside the cluster of
2925 2005-04-21 Hrvoje Niksic <hniksic@xemacs.org>
2927 * http-ntlm.c (ntlm_output): Fix setting the domain.
2928 Suggested by Sami Krank.
2930 2005-04-20 Mauro Tortonesi <mauro@ferrara.linux.it>
2932 * connect.c: Set IPV6_V6ONLY socket option when -6 switch is used.
2934 2005-04-20 FUJISHIMA Satsuki <sf@FreeBSD.org>
2936 * http.c (request_set_header): Fix the check whether a new header
2937 needs to be allocated.
2939 2005-04-18 Hrvoje Niksic <hniksic@xemacs.org>
2941 * utils.c (base64_encode): Use the parameter order that makes more
2942 sense. Return the length of the base64 written. Updated all
2945 2005-04-17 Hrvoje Niksic <hniksic@xemacs.org>
2947 * http.c (request_set_header): Free NAME when VALUE is NULL and
2948 freeing the header name is requested.
2950 2005-04-17 Hrvoje Niksic <hniksic@xemacs.org>
2952 * snprintf.c (fmtstr): Declare VALUE as const char *.
2953 Based on patch by Russ Allbery.
2955 2005-04-17 Hrvoje Niksic <hniksic@xemacs.org>
2957 * snprintf.c (fmtfp): More correct handling of significant digit
2958 count with %g -- 0.002 has one significant digit, not three.
2960 2005-04-16 Hrvoje Niksic <hniksic@xemacs.org>
2962 * retr.c (fd_read_body): Respect read timeout with non-interactive
2963 or no progress gauge -- treat ETIMEDOUT specially only when
2964 progress_interactive.
2965 Reported by FUJISHIMA Satsuki.
2967 2005-04-16 FUJISHIMA Satsuki <sf@FreeBSD.org>
2969 * http.c (gethttp): Don't use HTTP/1.0 persistent connections over
2972 2005-04-16 Hrvoje Niksic <hniksic@xemacs.org>
2974 * snprintf.c: Use the PARAMS macro to handle prototypes. Write
2975 function definitions in the ansi2knr-friendly way.
2976 (fmtstr): If string precision is specified, don't read VALUE past
2978 (dopr): Actually print %g and %e formats.
2979 (fmtfp): Fix a bug that caused 0.01 to be printed as 0.1.
2980 (fmtfp): Use LLONG in floating point conversions to be able to
2981 convert more digits.
2982 (fmtfp): Interpret precision as number of significant digits with
2984 (fmtfp): Omit trailing decimal zeros with %g.
2986 * snprintf.c: Don't include <ctype.h> because none of it is used.
2987 Include strings.h/string.h, as per Autoconf.
2989 2005-04-15 Hrvoje Niksic <hniksic@xemacs.org>
2991 * ptimer.c: Use _POSIX_TIMERS - 0 > 0, which handles the case when
2992 _POSIX_TIMERS is defined but empty, as well as the case when it is
2993 undefined. Do the same with the check for _POSIX_MONOTONIC_CLOCK.
2994 Suggested by Larry Jones.
2996 2005-04-15 Hrvoje Niksic <hniksic@xemacs.org>
2998 * ptimer.c: Check that _POSIX_TIMERS is defined as well as > 0.
2999 Problem reported by Steven M. Schweda.
3001 2005-04-14 Hrvoje Niksic <hniksic@xemacs.org>
3003 * http.c (skip_short_body): Print the skipped body data in debug
3005 (skip_short_body): Don't skip more than 4k of body data.
3006 (skip_short_body): Return whether the skipping was successful.
3007 (gethttp): If skip_short_body failed, invalidate the connection.
3009 2005-04-12 Gisle Vanem <giva@bgnett.no>
3011 * ftp.c (getftp): Ditto.
3013 * http.c (gethttp): Open the output file in binary mode.
3015 2005-04-11 Hrvoje Niksic <hniksic@xemacs.org>
3017 * hash.c: Conditionalize including config.h on HAVE_CONFIG_H
3018 instead of on STANDALONE.
3020 2005-04-11 Hrvoje Niksic <hniksic@xemacs.org>
3022 * gen_sslfunc.c (ssl_print_errors): Made static.
3023 (ssl_print_errors): Eliminate potentially dangerous fixed-size
3024 error buffer. Passing NULL to ERR_error_string causes it to use
3025 its own static buffer, which is fine for our purposes.
3027 * gen_sslfunc.c: Include gen_sslfunc.h. Make the declarations of
3028 ssl_init and ssl_conect match the actual definitions.
3029 (ssl_connect): Simply return a boolean, the SSL context is no
3030 longer useful as a return value.
3032 * retr.c: Don't include SSL headers; we don't need them.
3034 2005-04-11 Hrvoje Niksic <hniksic@xemacs.org>
3036 * config-post.h: Don't define _VA_LIST under Solaris; it breaks
3037 compilation with GCC 3.4 under Solaris 10. (It was defined to
3038 avoid a warning with previous versions of GCC.)
3040 2005-04-11 Hrvoje Niksic <hniksic@xemacs.org>
3042 * xmalloc.c (register_ptr): Warn the user to increase SZ prior to
3045 2005-04-11 Hrvoje Niksic <hniksic@xemacs.org>
3047 * convert.c (convert_cleanup): Free converted_files.
3049 2005-04-10 Hrvoje Niksic <hniksic@xemacs.org>
3051 * wget.h (DEBUGP): Use __builtin_expect to give a hint to GCC that
3052 opt.debug is false in the vast majority of cases.
3054 2005-04-10 Hrvoje Niksic <hniksic@xemacs.org>
3056 * config-post.h: Declare alloca as void *, not char *.
3058 2005-04-09 Hrvoje Niksic <hniksic@xemacs.org>
3060 * recur.c (download_child_p): When -p is used, (temporarily)
3061 ignore accept/reject rules for HTMLs, even when they are at the
3062 maximum recursion depth. That is because with -p we are, if
3063 necessary, overstepping the max. depth to get the requisites.
3065 2004-06-12 Larry Jones <lawrence.jones@ugsplm.com>
3067 * recur.c (download_child_p): Correct the logic in check number 6:
3068 test opt.reclevel (not DEPTH) against INFINITE_RECURSION.
3070 2005-04-09 Hrvoje Niksic <hniksic@xemacs.org>
3072 * url.c: Use "static const" in preference to "const static".
3073 Sun's cc warns that "storage class after type is obsolescent".
3075 * url.c (urlchr_table): Don't mark ~ as unsafe, too many broken
3076 web sites are confused when ~ is changed to %7E. Their servers
3077 redirect /%7Efoo/ to /~foo/, which Wget again accesses using %7E,
3078 causing further redirections, therefore looping infinitely. See
3079 Debian bug #301624 for an example.
3081 2005-04-09 Hrvoje Niksic <hniksic@xemacs.org>
3083 * alloca.c: Include wget.h to be able to use xmalloc. In addition
3084 to defining malloc to xmalloc, also define free to xfree.
3086 2005-04-09 Hrvoje Niksic <hniksic@xemacs.org>
3088 * http-ntlm.c (ntlm_output): Use "char", not "unsigned char" for
3089 ntlmbuf. Our base64 functions accept char anyway.
3090 (ntlm_output): Join up the format string, since we nominally
3091 support K&R compilers.
3092 (ntlm_output): Ditto.
3094 2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
3096 * ptimer.c: Use Windows timers under Cygwin, whose POSIX timer
3097 implementation is incomplete.
3099 2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
3101 * ptimer.c (struct ptimer): Remove the unused initialized field.
3103 * ptimer.c: Renamed function parameters from WT (which used to
3104 stand for wget_timer or wtimer) to PT.
3106 2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
3108 * ptimer.c (posix_init): Be smarter about choosing clocks. In
3109 decreasing order of preference, use CLOCK_MONOTONIC,
3110 CLOCK_HIGHRES, and CLOCK_REALTIME.
3111 (ptimer_allocate): Removed.
3113 * ptimer.c: Refactor the code by cleanly separating the
3114 architecture-dependent code from the architecture-independent
3117 2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
3119 * ptimer.c (ptimer_init): Explicitly check that
3120 _POSIX_MONOTONIC_CLOCK is *both* defined and >=0. (Undefined
3123 2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
3125 * ptimer.c (ptimer_diff): Fix typo affecting Windows build.
3127 2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
3129 * ptimer.c (ptimer_init): In fact, _POSIX_MONOTONIC_CLOCK needs to
3132 * ptimer.c (ptimer_init): Check whether _POSIX_MONOTONIC_CLOCK is
3133 defined instead of whether it's greater than 0. glibc defines it
3134 to 0, but still makes it available via sysconf.
3136 2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
3138 * mswindows.c (str_to_int64): Rename OVERFLOW and UNDERFLOW to
3139 INT64_OVERFLOW and INT64_UNDERFLOW, since those names are used.
3141 2005-04-07 Hrvoje Niksic <hniksic@xemacs.org>
3143 * ptimer.c: New file. Move the "wtimer" functions from utils.c to
3144 this file and rename them to ptimer_.
3146 2005-04-07 Hrvoje Niksic <hniksic@xemacs.org>
3148 * host.c (NO_ADDRESS): Define NO_ADDRESS only after the system
3149 headers have been included.
3151 2005-04-06 Hrvoje Niksic <hniksic@xemacs.org>
3153 * http.c (pconn): Include NTLM data, which is per-connection.
3154 (known_authentication_scheme_p): Recognize NTLM authorization.
3155 (create_authorization_line): Call ntlm_input and ntlm_output.
3157 * http-ntlm.c: New file, donated by Daniel Stenberg and originally
3158 written for curl, heavily modified for Wget.
3160 * utils.c (base64_encode): Relocated from http.c, since it is now
3161 used by http-ntlm.c, and will possibly be used elsewhere.
3162 (base64_decode): New function, originally based on code from GNU
3165 2005-04-02 Hrvoje Niksic <hniksic@xemacs.org>
3167 * ftp.c (ftp_loop): Ditto.
3169 * ftp-basic.c (ftp_pasv): Use the xzero shorthand for memset(0).
3172 2005-04-05 Mauro Tortonesi <mauro@ferrara.linux.it>
3174 * Makefile.in: removed string_t.c from list of source files.
3176 2005-04-04 Mauro Tortonesi <mauro@ferrara.linux.it>
3178 * string_t.c: Removed.
3180 * string_t.h: Removed.
3182 2005-04-02 Hrvoje Niksic <hniksic@xemacs.org>
3184 * url.c (rewrite_shorthand_url): Only accept recognized schemes.
3185 That way "foo:80" will correctly be rewritten to "http://foo:80"
3186 instead of left unchanged and ultimately rejected because of
3187 "unsupported scheme foo".
3189 2005-03-31 Hrvoje Niksic <hniksic@xemacs.org>
3191 * utils.c (number_to_string): Avoid explicit 64-bit constants;
3192 construct them by multiplication at compile-time.
3194 * utils.c, elsewhere: Don't append "L" to 32-bit integer
3195 constants; we aren't really compilable on 16-bit systems anyway.
3197 * hash.c (prime_size): Remove primes larger than 2^31, but include
3198 2^31-1, which is prime.
3200 2005-03-30 Hrvoje Niksic <hniksic@xemacs.org>
3202 * utils.c (string_set_to_array): New function.
3204 * convert.c: Replace the use of "slists" with sets/hash-tables,
3205 which in fact suit the intended purpose much better.
3206 downloaded_html_list is removed altogether.
3208 2005-03-29 Hrvoje Niksic <hniksic@xemacs.org>
3210 * ftp.h (enum): Rename GLOBALL, GETALL, and GETONE to
3211 GLOB_GLOBALL, GLOB_GETALL, and GLOB_GETONE to avoid conflict with
3214 2005-03-29 Hrvoje Niksic <hniksic@xemacs.org>
3216 * utils.c (numdigit): More correct handling of negative numbers.
3218 2005-03-21 Hrvoje Niksic <hniksic@xemacs.org>
3220 * http.c (gethttp): Print the human-readable size.
3222 * ftp.c (getftp): Print the human-readable size of the file to be
3225 * utils.c (human_readable): New function.
3227 * utils.c: Renamed "legible" to "with_thousand_seps",
3228 "legible_large_int" to "with_thousand_seps_large", and "legible_1"
3229 to "add_thousand_seps".
3231 2005-03-21 Hrvoje Niksic <hniksic@xemacs.org>
3233 * http.c (gethttp): Inhibit persistent connections when talking to
3234 proxies, as mandated by RFC 2068.
3236 2005-03-20 Hrvoje Niksic <hniksic@xemacs.org>
3238 * url.c (unescape_single_char): New function.
3239 (url_escape_dir): Use it to unescape slashes in directory
3241 (url_string): Escape unsafe chars in host name, except for the ':'
3242 charaters, which can appear in IPv6 addresses.
3244 * main.c (main): Don't access the cookie jar directly.
3246 * log.c (escnonprint_internal): Correctly calculate the needed
3247 string size. Don't forget the buffer's new size after having
3249 (log_cleanup): New function. Free the escnonprint ring data.
3251 * init.c (cleanup): Don't free the cookie jar explicitly, it is
3252 now done by http_cleanup.
3253 (cleanup): opt.user_headers is now a vector, free it with
3256 * http.c (gethttp): Make sure to free the request data, the status
3257 message, and the response data before returning from the function.
3258 (save_cookies): New function.
3259 (http_cleanup): Free the cookie jar here.
3261 * hash.c: Renamed string_hash to hash_string and ptrhash to
3262 hash_pointer. Exported hash_pointer.
3264 * xmalloc.c: Organized malloc_table (previously malloc_debug) as a
3265 simple EQ hash table. register_ptr and unregister_ptr are now of
3268 * xmalloc.c: Renamed "*_debug" to debugging_* and "*_real" to
3271 2005-03-12 Hrvoje Niksic <hniksic@xemacs.org>
3273 * utils.c (debug_test_md5): Moved to gen-md5.c.
3275 * mswindows.h: Don't declare inet_ntop, since we don't use it.
3277 * mswindows.h: For consistency, also wrap closesocket, it being
3280 * mswindows.h: Don't declare sleep and usleep; we're defining
3283 * mswindows.h (mkdir): Don't special-case Borland C, _mkdir
3284 works there as well.
3286 * host.c: Don't include winsock header files; the correct ones
3287 are already included by mswindows.h.
3289 * mswindows.c (xsleep): Round toward the nearest millisecond
3290 in an attempt to avoid average short sleeps.
3292 * utils.c (wtimer_granularity): Report correct values for
3293 Windows timers and for high-resolution timers.
3295 * utils.c (wtimer_initialize_once): New function, called to
3296 initialize the timer frequency.
3298 * utils.c: Replace the use of GetSystemTime with high-resolution
3299 counters under Windows. When high-resolution counters are
3300 unavailable, use GetTickCount().
3302 2005-03-15 Hrvoje Niksic <hniksic@xemacs.org>
3304 * retr.c (fd_read_body): Undo the 2004-11-18 change. Instead,
3307 2005-03-17 Hrvoje Niksic <hniksic@xemacs.org>
3309 * ftp-basic.c (ftp_login): Don't free the string if ftp_response
3310 returned an error status because the line didn't get allocated in
3313 2005-03-15 Hrvoje Niksic <hniksic@xemacs.org>
3315 * http.c (read_http_response_head): Limit the response size to 64k
3318 * retr.c (fd_read_hunk): Accept a MAXSIZE argument that limits the
3319 number of bytes the function is allowed to allocate.
3320 (fd_read_line): Limit the line to 4096 bytes.
3322 2005-03-12 Hrvoje Niksic <hniksic@xemacs.org>
3324 * wget.h: Include options.h after wgint has been defined.
3326 * options.h (struct options): Declare options processed with
3327 cmd_bytes as wgint, not long.
3329 2005-03-18 Hrvoje Niksic <hniksic@xemacs.org>
3331 * init.c (cmd_file): Use concat_strings.
3333 * http.c (basic_authentication_encode): Use concat_strings.
3335 * ftp-ls.c (ftp_index): Use concat_strings.
3337 * ftp-basic.c (ftp_request): Use concat_strings.
3339 * utils.c (concat_strings): New function.
3341 2005-03-12 Hrvoje Niksic <hniksic@xemacs.org>
3343 * init.c (simple_atof): Handle negative numbers; skip whitespace
3345 (simple_atoi): Ditto. Also, check for overflow and underflow.
3346 (cmd_number): Bail out on negative numbers.
3347 (parse_bytes_helper): Ditto.
3349 2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
3351 * http.c (gethttp): Handle multiple Set-Cookie headers sent by
3354 2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
3356 * init.c (defaults): Use passive FTP by default.
3358 2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
3360 * mswindows.c: Provide wrappers to Winsock functions that set
3361 errno to WSAGetLastError() in case of failure. Also provide a
3362 Windows-specific version of strerror.
3364 * mswindows.h: Wrap calls to socket, bind, connect, recv, send,
3365 select, getsockname, getpeername, and setsockopt.
3367 2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
3369 * url.c (url_parse): Reject port numbers larger than 65535. We
3370 also check for overflow while parsing port numbers.
3372 2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
3374 * utils.c (read_file): Don't use wgint for file size; LFS won't
3375 work since the file is mmap'ed as a whole.
3377 * options.h: Don't include stdio.h.
3381 * init.c: Disambiguate assignment from non-zero test to avoid
3384 * http.c (response_new): Don't needlessly post-increment count.
3386 * hash.c: Include stdio.h.
3388 * gnu-md5.h: Don't include stdio.h.
3390 * getopt.h (struct option): Always use const.
3392 * ftp.c (getftp): Avoid unnecessary assignment to RES to avoid
3395 * ftp-ls.c: Disambiguate assignment from non-zero test to avoid
3398 * cmpt.c (strptime_internal): Don't initialize rp_backup when
3399 !_NL_CURRENT to avoid Borland C warning.
3401 2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
3403 * utils.c (fopen_excl): Fix parse error when O_BINARY is
3406 2005-03-05 Hrvoje Niksic <hniksic@xemacs.org>
3408 * url.c (url_file_name): Don't allow hosts named ".." to be
3409 appended as path elements.
3411 2005-03-03 Hrvoje Niksic <hniksic@xemacs.org>
3413 * retr.c (retrieve_url): Escape location header.
3415 * http.c (print_server_response_1): Escape server response when
3417 (gethttp): Escape host name, status message, location header, and
3419 (http_loop): Escape error message from server.
3421 * host.c (lookup_host): Escape host name when printing it.
3423 * ftp.c (getftp): Escape user name when printing it.
3424 (getftp): Escape remote file and directory for printing.
3425 (getftp): Escape server listing when printing it.
3426 (ftp_retrieve_list): Escape link name and file name.
3427 (ftp_retrieve_glob): Escape file name.
3429 * ftp-basic.c (ftp_response): Escape server response when printing
3432 * cookies.c (parse_set_cookies): Escape the cookie field when
3434 (parse_set_cookies): Escape contents of remote header.
3435 (cookie_handle_set_cookie): Escape host name and cookie domain.
3437 * connect.c (connect_to_ip): Escape the host name.
3439 * log.c (escnonprint): New function, used for printing strings
3440 coming from the server that possibly contain non-ASCII characters.
3441 (escnonprint_uri): Ditto.
3443 2005-02-24 Hrvoje Niksic <hniksic@xemacs.org>
3445 * ftp.c (getftp): Ditto.
3447 * http.c (gethttp): When we're not supposed to overwrite files,
3448 use fopen_excl to open the file and recompute the file name.
3450 * log.c (redirect_output): Use unique_create to avoid a race
3453 * mswindows.c (fake_fork_child): Use unique_create.
3455 * utils.c (fopen_excl): New function that opens a stdio stream
3456 with the O_EXCL flag (where available).
3457 (unique_create): New function, like unique_name, but also creating
3458 the file and returning a file pointer.
3459 (fork_to_background): Use unique_create to create the file
3460 immediately to avoid race condition with multiple instances of
3463 2005-02-24 Hrvoje Niksic <hniksic@xemacs.org>
3465 * host.c (lookup_host): Test for AI_ADDRCONFIG directly, instead
3466 of checking for HAVE_GETADDRINFO_AI_ADDRCONFIG.
3468 2005-02-23 Hrvoje Niksic <hniksic@xemacs.org>
3470 * host.c (is_valid_ipv6_address): Move here from url.c.
3471 (lookup_host): If the address is numeric, don't print the
3472 "resolving..." line, don't set up DNS timeouts, and set the
3473 AI_NUMERICHOST hint, where available.
3475 2005-02-26 Gisle Vanem <giva@bgnett.no>
3477 * utils.c: Use the nnnLL syntax under GCC. Define struct_stat to
3478 struct _stati64 under __MINGW32__ as well as under MS VC.
3480 2005-02-26 Hrvoje Niksic <hniksic@xemacs.org>
3482 * utils.c: Use the nnnI64 syntax for __int64 constants under all
3484 (SPRINTF_WGINT): Use "%I64" under all Windows compilers.
3486 * mswindows.h (WGINT_MAX): Use the nnnI64 syntax for
3487 __int64 constants under all Windows compilers.
3488 (struct_stat): Use `struct stati64' under Borland C.
3489 (fstat): Don't redefine to _fstati64 under Borland.
3491 * mswindows.c: Define str_to_int64 under Borland C as well as
3492 under (older) Visual C.
3494 2005-02-25 Hrvoje Niksic <hniksic@xemacs.org>
3496 * ftp.c (getftp): Initialize err to suppress compiler warning.
3498 2005-02-24 Hrvoje Niksic <hniksic@xemacs.org>
3500 * ftp.c (ftp_expected_bytes): Fix bug that caused infloop because
3501 of not correctly skipping the '(' character.
3503 2005-02-24 Hrvoje Niksic <hniksic@xemacs.org>
3505 * mswindows.c (wget_ftello): Removed.
3507 * mswindows.h: Remove bogus definition of stat.
3508 (wget_ftello): Remove the leftover ftello replacement.
3510 2005-02-20 Hrvoje Niksic <hniksic@xemacs.org>
3512 * mswindows.c (wget_ftello): Wget's replacement for ftello.
3514 * utils.c (file_size): Use ftello where available.
3516 * ftp-ls.c (ftp_parse_unix_ls): Use str_to_wgint to parse the file
3518 (ftp_parse_winnt_ls): Ditto.
3520 * ftp-basic.c (ftp_size): Use str_to_wgint to convert number to
3521 wgint; pass 10 instead of 0 as the BASE argument.
3523 * ftp.c (ftp_expected_bytes): Use str_to_wgint to parse the file
3526 * sysdep.h (LARGE_INT_FMT): Use __int64 as LARGE_INT on
3527 MSVC/Windows; print it with "%I64".
3529 * wget.h: Define a `wgint' type, normally aliased to (the possibly
3530 64-bit variant of) off_t.
3532 * all: Use `wgint' instead of `long' for numeric variables that
3533 can hold file sizes.
3535 * utils.c (number_to_string): Support printing of `wgint'
3537 (number_to_static_string): New function.
3539 * all: Replace printf("%ld", long_value) with printf("%s",
3540 number_to_static_string(wgint_value)).
3542 2005-02-18 Mauro Tortonesi <mauro@ferrara.linux.it>
3544 * main.c: Added the --ftp-passwd command line option.
3546 * init.c: Renamed command passwd to ftppasswd.
3548 2005-02-11 Mauro Tortonesi <mauro@ferrara.linux.it>
3550 * string_t.c: Fixed a bug in do_escape and triggered escape of
3551 backslashes in string_escape to avoid ambiguities in the result
3554 2005-02-10 Mauro Tortonesi <mauro@ferrara.linux.it>
3556 * string.h: Renamed to string_t.h to fix a compilation conflict
3557 with the string.h header in the standard C library.
3559 * string.c: Renamed to string_t.c for consistency with string.h.
3561 * string_t.c: Ditto.
3563 * string_t.h: Ditto.
3565 2004-12-31 Mauro Tortonesi <mauro@ferrara.linux.it>
3567 * string.c: New file.
3569 * string.h: New file.
3571 * Makefile.in: Added string.c to the list of modules to compile.
3573 * main.c: Updated copyright.
3575 2004-11-18 Ulf Harnhammar <ulf.harnhammar.9485@student.uu.se>
3577 * ftp-ls.c: Fixed a problem in ftp_parse_winnt_ls that could allow a
3578 malicious remote FTP server to crash wget.
3580 2004-11-18 Hans-Andreas Engel <engel@node.ch>
3582 * http.c: Enable --convert-links (-k) when a single page is downloaded
3583 via --output-document (-O).
3585 2004-11-18 Mauro Tortonesi <mauro@deepspace6.net>
3587 * connect.c: Minor correction to the comment in front of fd_peek.
3589 2004-11-18 Leonid Petrov <nouser@lpetrov.net>
3591 * retr.c: Fix a timeout problem in fd_read_body when using http_proxy.
3593 2004-11-15 YAMAZAKI Makoto <Yamazaki.Makoto@fujixerox.co.jp>
3595 * netrc.c: Fix termination by assertion bug in netrc parsing.
3597 2004-05-09 David Fritz <zeroxdf@att.net>
3599 * mswindows.c (fake_fork): Pass entire command line to the child
3602 2004-03-31 Hrvoje Niksic <hniksic@xemacs.org>
3604 * http.c (gethttp): Fix typo: SCHEME_SSL -> SCHEME_HTTPS.
3606 2004-03-30 Hrvoje Niksic <hniksic@xemacs.org>
3608 * http.c (gethttp): Send the Proxy-Authorization header over
3609 non-SSL connections too.
3611 2004-03-25 David Fritz <zeroxdf@att.net>
3613 * mswindows.c (fake_fork_child): Ignore error code when
3614 OpenFileMapping() fails; assume it failed because the object does
3617 2004-03-24 David Fritz <zeroxdf@att.net>
3619 * mswindows.c (fake_fork): New function.
3621 * mswindows.c (fork_to_background): Use it.
3623 2004-03-19 David Fritz <zeroxdf@att.net>
3625 * mswindows.c (ws_hangup): Incorporate old fork_to_background()
3626 code. Add event name argument.
3627 (fork_to_backgorund): Now a simple wrapper around ws_hangup().
3628 (ws_handler): Correctly handle the case when neither CTRLC_BACKGND
3629 nor CTRLBREAK_BACKGND are defined. Don't bother handling close,
3630 logoff, or shutdown events. Call ws_hangup() with the correct
3631 event name; don't assume it was CTRL+Break.
3633 2004-03-19 Hrvoje Niksic <hniksic@xemacs.org>
3635 * url.c (url_parse): Decode %HH sequences in host name.
3637 2004-03-04 Hrvoje Niksic <hniksic@xemacs.org>
3639 * convert.c (local_quote_string): Quote "#" as "%23" and "%" as
3640 "%25" when creating links to local files.
3642 2004-03-02 David Fritz <zeroxdf@att.net>
3644 * mswindows.c (ws_percenttitle): Guard against future changes by
3645 doing nothing if the proper variables have not been initialized.
3646 Clamp percentage value.
3648 2004-03-04 Gisle Vanem <giva@bgnett.no>
3650 * retr.c (fd_read_body): Don't change console title if quiet.
3652 2004-02-25 David Fritz <zeroxdf@att.net>
3654 * mswindows.c (set_sleep_mode): Remove argument and return value.
3655 Call GetModuleHandle() instead of LoadLibrary()/FreeLibrary() for
3656 kernel32.dll. Use typedef for function-pointer. Don't cast
3657 l-value. Don't use dereference operator when calling through
3659 (ws_startup): Update call to set_sleep_mode().
3660 (ws_cleanup): Remove call to set_sleep_mode().
3662 2004-02-23 David Fritz <zeroxdf@att.net>
3664 * http.c (http_loop): Ditto.
3666 * ftp.c (ftp_loop_internal): Update call to ws_changetitle().
3668 * main.c (main): Don't bother calling ws_changetitle().
3670 * mswindows.h (ws_changetitle): Update prototype.
3672 * mswindows.c (ws_changetitle): Remove second argument. Use
3674 (ws_percenttitle): Only update title when percentage has changed.
3676 2004-02-23 David Fritz <zeroxdf@att.net>
3678 * mswindows.h: Ditto.
3680 * mswindows.c: Misc. formatting/comment tweaks throughout.
3682 2004-02-20 David Fritz <zeroxdf@att.net>
3684 * main.c (print_help): Remove call to ws_help().
3686 * mswindows.c (ws_help): Remove.
3688 * mswindows.h (ws_help): Remove.
3690 2004-02-16 David Fritz <zeroxdf@att.net>
3692 * init.c (home_dir): Use aprintf() instead of xmalloc()/sprintf().
3693 Under Windows, if $HOME is not defined, use the directory that
3694 contains the Wget binary instead of hard-coded `C:\'.
3695 (wgetrc_file_name): Under Windows, look for $HOME/.wgetrc then, if
3696 not found, look for wget.ini in the directory of the Wget binary.
3698 * mswindows.c (ws_mypath): Employ slightly more robust methodology.
3699 Strip trailing path separator.
3701 2004-02-06 Hrvoje Niksic <hniksic@xemacs.org>
3703 * http.c (gethttp): Respect --ignore-length.
3704 (gethttp): Inhibit keep-alive if --ignore-length is specified.
3706 2004-02-06 Hrvoje Niksic <hniksic@xemacs.org>
3708 * connect.c (sockaddr_set_data): Zero out
3709 sockaddr_in/sockaddr_in6. Apparently BSD-derived stacks need this
3710 when binding a socket to local address.
3712 2004-02-04 Hrvoje Niksic <hniksic@xemacs.org>
3714 * hash.c: Make the file compilable outside Wget source tree when
3715 -DSTANDALONE is used.
3717 2004-01-29 Hrvoje Niksic <hniksic@xemacs.org>
3719 * utils.c (determine_screen_width): Return 0 if not running on
3720 Windows or on a TIOCGWINSZ-capable system.
3722 2004-01-28 David Fritz <zeroxdf@att.net>
3724 * utils.c (determine_screen_width): Correctly determine console
3725 width under Windows.
3727 2004-01-28 Christian Biere <christianbiere@gmx.de>
3729 * progress.c (bar_set_params): Fixed syntax error when HAVE_ISATTY
3732 * ftp.c (ftp_loop_internal): Allocate a larger buffer in case
3733 "try" gets translated to something large. Ditto in http_loop in
3736 * http.c (response_header_copy): Don't write to buf[BUFSIZE].
3738 * ftp-opie.c (skey_response): Eliminate unnecessary string
3739 concatenation; just call gen_md5_update twice.
3741 2004-01-25 Hrvoje Niksic <hniksic@xemacs.org>
3743 * utils.c (xsleep): Don't call usleep with values larger than
3746 2003-12-16 Hrvoje Niksic <hniksic@xemacs.org>
3748 * http.c (gethttp): Fix generation of `Content-Length'.
3750 2003-12-15 Gisle Vanem <giva@bgnett.no>
3752 * url.c (url_skip_credentials): Fixed return value; 'url' if no
3755 2003-12-14 Hrvoje Niksic <hniksic@xemacs.org>
3757 * url.c (url_skip_credentials): Return a pointer directly.
3759 2003-12-14 Hrvoje Niksic <hniksic@xemacs.org>
3761 * url.c (url_file_name): Ditto.
3762 (parse_errors): Ditto.
3764 * retr.c (retr_rate): Ditto.
3766 * progress.c (create_image): Ditto.
3768 * netrc.c (parse_netrc): Ditto.
3770 * main.c (struct cmdline_option): Ditto.
3771 (redirect_output_signal): Ditto.
3773 * init.c (commands): Ditto.
3775 * ftp-ls.c (ftp_index): Ditto.
3777 * cookies.c (check_domain_match): Declare the pointer to a literal
3780 2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
3782 * retr.c (fd_read_body): Pass total size to progress_create, not
3783 the remaining amount.
3785 2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
3787 * retr.c (fd_read_body): Don't fiddle with "interactive timeout"
3788 if read timeout is unset.
3790 2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
3792 * connect.c (bind_local): Don't set the IPV6_V6ONLY option on the
3795 2003-12-06 Hrvoje Niksic <hniksic@xemacs.org>
3797 * url.c (url_file_name): Respect the setting of
3798 opt.protocol_directories.
3800 * main.c (main): Only check for ret=='?' when longindex is unset.
3801 (option_data): New option --protocol-directories.
3803 2003-12-06 Hrvoje Niksic <hniksic@xemacs.org>
3805 * ftp.c (getftp): Ditto.
3807 * http.c (gethttp): Correctly calculate bandwidth as total data
3808 read divided with download time.
3810 * retr.c (fd_read_body): Separate the return values for data
3813 2003-12-05 Hrvoje Niksic <hniksic@xemacs.org>
3815 * http.c (H_REDIRECTED): Respect the HTTP/1.1 "303 See Other"
3817 Suggested by Dan Razzell.
3819 2003-11-30 Hrvoje Niksic <hniksic@xemacs.org>
3821 * retr.c (fd_read_body): Report the amount of data *written* as
3822 amount_read. This is not entirely logical, but that's what the
3823 callers expect, and it's not easy to change.
3825 * ftp.c (ftp_loop_internal): Ditto.
3827 * http.c (http_loop): Be smarter about assigning restval; if we're
3828 in the nth pass of a download, simply use the information we have
3829 about how much data has been retrieved as restval.
3831 * ftp.c (getftp): Ditto for FTP "REST" command.
3833 * http.c (gethttp): When the server doesn't respect range, skip
3834 the first RESTVAL bytes of the read body. Never truncate the
3837 * retr.c (fd_read_body): Support skipping initial STARTPOS octets.
3839 2003-11-30 Hrvoje Niksic <hniksic@xemacs.org>
3841 * http.c (skip_short_body): Renamed skip_body to skip_short_body;
3842 don't bother calling fd_read_body.
3844 2003-11-30 Hrvoje Niksic <hniksic@xemacs.org>
3846 * retr.c (fd_read_body): Sanitize arguments and document them
3847 better. Make sure the timer is created and updated only if
3848 necessary. Updated callers.
3850 2003-11-30 Hrvoje Niksic <hniksic@xemacs.org>