]> sjero.net Git - wget/blob - src/ChangeLog
Rename --html-extension to --adjust-extension.
[wget] / src / ChangeLog
1 2009-07-28  Micah Cowan  <micah@cowan.name>
2
3         * main.c (option_data): Rename --html-extension to
4         --adjust-extension.
5         (print_help): Ditto.
6         
7         * options.h (struct option): Rename html_extension to
8         adjust_extension.
9         * http.c (gethttp): Ditto.
10         * convert.c (local_quote_string): Ditto.
11
12         * init.c (commands): Add "adjustextension", and reflect rename
13         change for opt.adjust_extension, for both "adjustextension" and
14         "htmlextension".
15
16 2009-07-27  Micah Cowan  <micah@cowan.name>
17
18         * options.h (struct options): Added restrict_files_nonascii
19         boolean field.
20
21         * url.c (FILE_CHAR_TEST): Add check for chars outside the ASCII
22         range.
23
24         * init.c (defaults): Add restrict_files_nonascii to initialization.
25         (cmd_spec_restrict_file_names): Allow parsing of "ascii" keyword.
26
27 2009-07-27  Marcel Telka  <marcel@telka.sk>
28
29         * iri.c (do_conversion): Typo: invalide -> invalid
30
31 2009-07-27  Petr Pisar  <petr.pisar@atlas.cz>
32
33         * main.c (print_help): Fixed a couple typos.
34
35 2009-07-26  Micah Cowan  <micah@cowan.name>
36
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.
41
42 2009-07-23  Micah Cowan  <micah@cowan.name>
43
44         * progress.c (get_eta): Change "Translation note" in comment to
45         "TRANSLATORS", so it actually appears in wget.pot.
46
47 2009-07-06  Micah Cowan  <micah@cowan.name>
48
49         * main.c (print_help): Improve documentation of --base.
50
51 2009-07-05  Micah Cowan  <micah@cowan.name>
52
53         * html-url.c (tag_handle_meta): Handle meta name="robots"
54         properly: deal with whitespace, commas after...
55
56         * netrc.c (parse_netrc): Rename local-scope variable "quote" to
57         "qmark", to avoid conflict with the function name.
58
59 2009-07-05  Petr Pisar  <petr.pisar@atlas.cz>
60
61         * main.c (print_version): Mark initial line for translation, along
62         with (env), (user), and (system). Change copyright year to 2009.
63
64         * http.c (http_loop): Space after colon.
65
66         * gnutls.c (ssl_check_certificate): Use quote function, rather
67         than explicit quotes.
68
69 2009-07-05  Micah Cowan  <micah@cowan.name>
70
71         * Makefile.am (version.c): Add dependency on configure.ac.
72
73         * iri.c: Mark some strings for translation.
74
75 2009-07-04  Steven Schweda  <sms@antinode.info>
76
77         * wget.h (ORIG_SFX): Macro added, to supply an alternative "_orig"
78         suffix on VMS.
79         
80         * connect.c, host.c, host.h, main.c: Include "vms_ip.h" rather
81         than <netdb.h> on VMS systems.
82
83         * convert.c (write_backup_file): Use "_orig" rather than ".orig"
84         on VMS.
85
86         * ftp-basic.c (ftp_list): Don't use LIST -a on VMS servers.
87
88         * ftp.c [__VMS]: Include "vms.h"
89         * ftp.c (getftp): Disable some unhelpful "for VMS" code. Pass the
90         OS type to ftp_list.
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.
94
95         * ftp-ls.c [__VMS]: Various improvements.
96
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.
103
104         * init.c (wgetrc_user_file_name) [__VMS]: Adjustments for where to
105         find the .wgetrc.
106
107         * log.c: Adjustments to improve handling of log files on VMS.
108
109         * main.c [__VMS]: Added --ftp-stmlf option (and associated
110         documentation). Adjust description of backup-suffixes, as they now
111         differ for VMS.
112         (print_help, print_version): Include OS type in version
113         information.
114         (main) [__VMS]: Invoke fopen with extra options, to specify file
115         type information.
116
117         * netrc.c (search_netrc) [__VMS]: Fix .netrc-finding.
118
119         * openssl.c, openssl.h (ssl_connect_wget): Renamed from ssl_connect.
120
121         * options.h (struct options): Add ftp_stmlf field.
122
123         * retr.c (write_data) [__VMS]: Avoid fflush.
124
125         * url.c [__VMS]: Include vms.h.
126         * url.c (url_file_name) [__VMS]: Handle naming as required for VMS.
127
128         * utils.c [__VMS]: Include vms.h. Various added facilities for VMS
129         needs.
130
131 2009-07-04  Micah Cowan  <micah@cowan.name>
132
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
137         specifications.
138         (format_and_print_line): For similar reasons, don't calculate
139         line-continuation tabulation based on the number of bytes in a
140         string.
141
142 2009-07-04  Steven Schubiger  <stsc@member.fsf.org>
143
144         * url.c (url_parse): If an URL scheme is invalid, distinguish
145         between an unsupported or missing scheme.
146
147         * url.c: Add a "missing scheme" entry to parse_errors.
148
149 2009-07-03  Micah Cowan  <micah@cowan.name>
150
151         * iri.h (iri_dup): Provide macro definition for when IRIs are
152         disabled.
153
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.
158
159 2009-07-02  Micah Cowan  <micah@cowan.name>
160
161         * recur.c (url_enqueue): Quote enqueue/dequeue debug messages.
162
163         * html-url.c (append_url): Change "merge()" quoting style from
164         locale_quoting_style to escape_quoting_style.
165
166 2009-07-01  Micah Cowan  <micah@cowan.name>
167
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.
172
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).
176
177 2009-07-01  Steven Schubiger  <stsc@member.fsf.org>
178
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
181         where needed.
182         
183         * build_info.c: Remove this static source file.
184         
185         * build_info.c.in: Data for generation of build_info.c.
186
187 2009-06-29  Micah Cowan  <micah@cowan.name>
188
189         * html-url.c (append_url): Quote some more arguments that might
190         contain characters that are inappropriate to display for the
191         current locale.
192
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.
196
197         * iri.c, iri.h (iri_dup): Added.
198
199         * retr.c (retrieve_url): Re-parse for IRI fallback.
200
201         * main.c (main): Set up iri before the url_parse invocation (so we
202         can use it).
203
204 2009-06-20  Jay Krell  <jay.krell@cornell.edu>
205
206         * sysdep.h (_ALL_SOURCE): (small change) Define the _ALL_SOURCE
207         macro on INTERIX systems. (I switched the location from ftp.c to
208         sysdep.h --mjc)
209
210 2009-06-15  Micah Cowan  <micah@cowan.name>
211
212         * ftp.c (getftp): If we can't accept the connection, return
213         CONERROR, not whatever the contents of err happens to be. Fixes
214         bug #25015.
215
216         * retr.c (fd_read_body): Make both args to progress_create
217         consistent, resulting in an accurate progress display. Fixes bug
218         #24948.
219
220 2009-06-14  Micah Cowan  <micah@cowan.name>
221
222         * Makefile.am (wget_SOURCES): css-tokens.h needs to ship with
223         dist, too.
224
225 2009-06-13  Micah Cowan  <micah@cowan.name>
226
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.
230
231 2009-06-13  Julien Pichon  <julienpichon7@gmail.com>
232
233         * init.c: Handle tilde-expansion in wgetrc commands, without
234         resorting to setting/unsetting globals to change behavior in one
235         call location.
236
237 2009-06-12  Micah Cowan  <micah@cowan.name>
238
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
242         hurt...
243
244         * build_info.c (library): Handle "https" as a feature in its own
245         right, apart from "gnutls" and "openssl".
246
247         * host.c: Declare h_errno if no declaration is provided. Idea
248         thanks to Maciej W. Rozycki.
249
250 2009-06-11  Xin Zou  <zouxin2008@gmail.com>     
251         
252         * http.c (gethttp): Fix some memory leaks.
253         
254 2009-06-11  Micah Cowan  <micah@cowan.name>
255
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>.
259
260         * sysdep.h: Need NAMESPACE_TWEAKS on non-Linux glibc-based
261         systems, too. Thanks to Robert Millan.
262
263 2009-05-28  Steven Schubiger  <stsc@member.fsf.org>
264
265         * ftp.c (ftp_get_listing): Update the "listing file" 
266         string after calling ftp_loop_internal().
267
268 2009-05-27  Steven Schubiger  <stsc@member.fsf.org>
269
270         * ftp.c (ftp_get_listing): Duplicate the "listing file"
271         string to avoid memory corruption when FOPEN_EXCL_ERR is
272         encountered.
273
274 2009-05-17  Steven Schubiger  <stsc@member.fsf.org>
275
276         * progress.c (eta_to_human_short): Fix the remaining hours
277         to be displayed. Spotted by Tadeu Martins (#26411).
278
279 2009-04-24  Micah Cowan  <micah@cowan.name>
280
281         * hash.c: Change stdint.h inclusion to use HAVE_STDINT_H, not C99
282         check.
283
284         * connect.c: stdint.h inclusion added.
285
286         Thanks to Markus Duft <mduft@gentoo.org> for a similar patch.
287         
288 2009-04-20  Micah Cowan  <micah@cowan.name>
289
290         * Makefile.am (version.c): Fix unportable use of "echo -n".
291
292 2009-04-13  Steven Schubiger  <stsc@member.fsf.org>
293
294         * ftp.c (ftp_retrieve_list): Move the duplicated code that
295         determines the local file to a function.
296         
297         * http.c (http_loop): Likewise.
298
299         * retr.c (set_local_file): New function.
300
301 2009-04-11  Steven Schubiger  <stsc@member.fsf.org>
302
303         * init.c (initialize): Run a custom SYSTEM_WGETRC when 
304         provided as an environment variable.
305
306 2009-02-27  Gisle Vanem  <gvanem@broadpark.no>
307
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
310         fine.
311
312 2009-02-27  Steven Schubiger  <stsc@member.fsf.org>
313
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.
317
318 2009-02-21  Steven Schubiger  <stsc@member.fsf.org>
319
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.
323
324 2009-02-18  Steven Schubiger  <stsc@members.fsf.org>
325
326         * recur.h: Remove the dangling declaration for recursive_cleanup().
327
328 2009-02-01  Gerardo E. Gidoni  <gerel@gnu.org>
329
330         * main.c, recur.c, recur.h, res.c, retr.c, retr.h: restructured code to
331         avoid multiple 'url_parse' calls.
332
333 2008-11-13  Micah Cowan  <micah@cowan.name>
334
335         * http.c (gethttp): Don't do anything when content-length >= our
336         requested range.
337
338 2008-11-27  Saint Xavier  <wget@sxav.eu>
339
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.
344
345 2008-11-16  Steven Schubiger  <stsc@members.fsf.org>
346
347         * main.c: Declare and initialize the numurls counter.
348
349         * ftp.c, http.c: Make the counter visible here and use it.
350         
351         * options.h: Remove old declaration from options struct.
352
353 2008-11-15  Steven Schubiger  <stsc@members.fsf.org>
354
355         * init.c (defaults): Set default waitretry value.
356
357 2008-11-14  Steven Schubiger  <stsc@members.fsf.org>
358
359         * main.c (format_and_print_line): Use a custom format 
360         string for printing leading spaces.
361
362 2008-11-12  Micah Cowan  <micah@cowan.name>
363
364         * ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href.
365
366 2008-11-12  Alexander Belopolsky  <alexander.belopolsky@gmail.com>
367
368         * url.c, url.h (url_escape_unsafe_and_reserved): Added.
369
370         * ftp-ls.c (ftp_index): URL-escape, rather than HTML-escape, the
371         filename appearing in the link.
372
373 2008-11-12  Steven Schubiger  <stsc@members.fsf.org>
374
375         * main.c (print_version): Hand the relevant
376         xstrdup/xfree calls back to format_and_print_line().
377
378 2008-11-11  Steven Schubiger  <stsc@members.fsf.org>
379
380         * main.c (format_and_print_line): Move both the memory
381         allocating and freeing bits upwards to print_version().
382
383 2008-11-10  Saint Xavier  <wget@sxav.eu>
384
385         * http.c: Make --auth-no-challenge works with user:pass@ in URLs.
386
387 2008-11-05  Micah Cowan  <micah@cowan.name>
388
389         * ftp.c (print_length): Should print humanized "size remaining"
390         only when it's at least 1k.
391
392 2008-10-31  Micah Cowan  <micah@cowan.name>
393
394         * main.c (print_version): Add information about the mailing list.
395
396 2008-10-31  Alexander Drozdov  <dzal_mail@mtu-net.ru>
397
398         * retr.c (fd_read_hunk): Make assert deal with maxsize == 0.
399
400         * ftp-ls.c (clean_line): Prevent underflow on empty lines.
401
402 2008-10-26  Gisle Vanem  <gvanem@broadpark.no>
403
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.
407
408 2008-09-09  Gisle Vanem  <gvanem@broadpark.no>
409
410         * url.c (url_error): Use aprintf, not asprintf.
411         
412 2008-09-09  Micah Cowan  <micah@cowan.name>
413
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.
417
418         * build_info.c, main.c: Remove unnecessary extern vars
419         system_wgetrc and locale_dir.
420
421         * main.c: Define program_name for lib/error.c.
422
423 2008-09-02  Gisle Vanem  <gvanem@broadpark.no>
424
425         * mswindows.h: Must ensure <stdio.h> is included before
426         we redefine ?vsnprintf().
427
428 2008-08-08  Steven Schubiger  <stsc@members.fsf.org>
429
430         * main.c, utils.h: Removed some dead conditional DEBUG_MALLOC code.
431
432 2008-08-03  Micah Cowan  <micah@cowan.name>
433
434         * main.c (print_help): Added --default-page.
435
436 2008-08-01  Joao Ferreira  <joao@joaoff.com>
437
438         * init.c, main.c, options.h, url.c: Added option --default-page
439         to support alternative default names for index.html
440
441 2008-08-03  Micah Cowan  <micah@cowan.name>
442
443         * build_info.c, css-url.c: #include wget.h, not config.h.
444
445 2008-08-03  Steven Schubiger  <stsc@members.fsf.org>
446
447         * url.c, url.h (url_error): Better messages for unsupported
448         schemes, especially https.
449
450         * html-url.c, recur.c, retr.c: Adjust to new url_error
451         invocation, and free result.
452
453 2008-07-17  Steven Schubiger  <stsc@members.fsf.org>
454
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.
458
459         * init.c (cleanup): Free the memory associated with the base
460         option (when DEBUG_MALLOC is defined).
461
462 2008-07-02  Xavier Saint  <wget@sxav.eu>
463
464         * iri.c, iri.h  : New function idn_decode() to decode ASCII
465         encoded hostname to the locale.
466
467         * host.c : Show hostname to be resolved both in locale and
468         ASCII encoded.
469
470 2008-06-28  Steven Schubiger  <stsc@members.fsf.org>
471
472         * retr.c (retrieve_from_file): Allow for reading the links from
473         an external file (HTTP/FTP).
474
475 2008-06-26  Xavier Saint  <wget@sxav.eu>
476
477         * iri.c, iri.h : New functions locale_to_utf8() and
478         idn_encode() adding basic capabilities of IRI/IDN.
479
480         * url.c : Convert URLs from locale to UTF-8 allowing a basic
481         support of IRI/IDN
482
483 2008-06-25  Steven Schubiger  <stsc@members.fsf.org>
484
485         * ftp.c (getftp): When spidering a FTP URL, emit a diagnostic
486         message if the remote file exists.
487
488 2008-06-24  Steven Schubiger  <stsc@members.fsf.org>
489
490         * http.c (http_loop): Replace escnonprint() occurence with
491         a quotearg_style() call.
492
493 2008-06-24  Micah Cowan  <micah@cowan.name>
494
495         * ftp-ls.c (ftp_index): Don't assume time_t* is compatible with
496         long*. Fixes crash on Windows, and probably other systems.
497
498 2008-06-22  Steven Schubiger  <stsc@members.fsf.org>
499
500         * http.c: Explicitly initialize and deallocate the message
501         string used by the -nv --spider functionality.
502
503 2008-06-22  Steven Schubiger  <schubiger@gmail.com>
504
505         * http.c: Make -nv --spider include the file's name when it
506         exists.
507
508 2008-06-22  Micah Cowan  <micah@cowan.name>
509
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).
514
515 2008-06-19  Xavier Saint  <wget@sxav.eu>
516
517         * iri.c, iri.h : New function check_encoding_name() as
518         a preliminary encoding name check.
519
520         * main.c, iri.c : Make use of check_encoding_name().
521
522 2008-06-19  Xavier Saint  <wget@sxav.eu>
523
524         * iri.c : Include missing stringprep.h file and add a
525         cast.
526
527         * init.c : set a default initial value for opt.enable_iri,
528         opt.locale and opt.encoding_remote.
529
530 2008-06-19  Xavier Saint  <wget@sxav.eu>
531
532         * iri.c, iri.h : Add a new function find_locale() to find
533         out the local system encoding.
534
535         * main.c : Make use of find_locale().
536
537 2008-06-19  Xavier Saint  <wget@sxav.eu>
538
539         * html-url.c : Add "content-type" meta tag parsing for
540         retrieving page encoding.
541
542         * iri.h : Make no-op version of parse_charset() return
543         NULL.
544
545 2008-06-16  Micah Cowan  <micah@cowan.name>
546
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.
550
551 2008-06-14  Xavier Saint  <wget@sxav.eu>
552
553         * iri.c, iri.h : New files.
554
555         * Makefile.am : Add files iri.h and conditional iri.c.
556
557         * build_info.c : Add compiled feature "iri".
558
559         * http.c : include iri.h and parse charset from Content-Type
560         header.
561
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.
565
566 2008-06-13  Micah Cowan  <micah@cowan.name>
567
568         * build_info.c: ENABLE_NTLM, not HAVE_NTLM; distinguish OpenSSL
569         from "ssl".
570
571 2008-06-13  Madhusudan Hosaagrahara <com.gmail.hrmadhu>
572
573         * Makefile.am, main.c, init.c, init.h, build_info.c: Adds build
574         information to the --version command line option. Fixes bug
575         #20636.
576
577 2008-06-01  Micah Cowan  <micah@cowan.name>
578
579         * main.c [WINDOWS]: Reopen stdout in binary mode, when -O - is
580         given.
581
582 2008-05-31 Micah Cowan  <micah@cowan.name>
583
584         * html-url.c, http.c: Avoid casts in a couple spots.
585
586 2008-05-30 Henri Häkkinen  <henux@users.sourceforge.net>
587
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.
591
592 2008-05-26  Steven Schubiger  <schubiger@gmail.com>
593
594         * ftp.c (getftp): Replace last remaining invocation of escnonprint
595         with gnulib quote.
596
597 2008-05-19  Micah Cowan  <micah@cowan.name>
598
599         * main.c (main): Password prompt should be done only once (not
600         once per argument), and should be done prior to the background
601         fork.
602
603 2008-05-17  Steven Schubiger  <schubiger@gmail.com>
604
605         * init.c (defaults): Set the preferred IP family to `none' by
606         default.
607
608 2008-05-17  Kenny Parnell  <k.parnell@gmail.com>
609
610         (cmd_spec_prefer_family): Initialize prefer_family to prefer_none.
611
612 2008-05-17  Micah Cowan  <micah@cowan.name>
613
614         * main.c (main): Handle Ctrl-D on command-line.
615
616 2008-05-15  Steven Schubiger  <schubiger@gmail.com>
617
618         * ftp.c (getftp): Verify that the file actually exists in FTP, by
619         checking it against the listing.
620
621 2008-05-15  Micah Cowan  <micah@cowan.name>
622
623         * main.c (prompt_for_password): Use the quote module.
624
625 2008-05-14  Micah Cowan  <micah@cowan.name>
626
627         * ftp.c (ftp_retrieve_list): Symlinks and other filenames
628         should be fully quoted.
629
630 2008-05-12  Micah Cowan  <micah@cowan.name>
631
632         * main.c (main): Downgrade "-N with -O" to a warning, and switch
633         it off to avoid confusing messages.
634
635 2008-04-30  Micah Cowan  <micah@cowan.name>
636
637         * progress.c (create_image): Fix glitch where too many spaces are
638         printed on lines that don't display the ETA, in multibyte
639         locales.
640
641 2008-04-30  Steven Schubiger  <stsc@members.fsf.org>
642
643         * main.c (main): New code that handles prompting for passwords
644         when specified explicitly via command-line option (using gnulib's
645         getpass-gnu module).
646         (main): Include the getpass header.
647
648         * init.c: Add "ask-password" to the list of recognized commands.
649
650         * options.h: Add an according boolean member to the options
651         struct.
652
653         * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
654         out, because they're now defined independently by config.h.
655
656 2008-04-27  Rabin Vincent  <rabin@rab.in>
657
658         * http.c (http_loop): Fix return for the case where we don't
659         download a file because of -nc.
660
661 2008-04-27  Micah Cowan  <micah@cowan.name>
662
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
666         mu_run_test.
667
668         * test.c (all_tests): Add test_path_simplify.
669
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
672         cases.
673
674 2008-04-26  Micah Cowan  <micah@cowan.name>
675
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.
679
680 2008-04-25  Micah Cowan  <micah@cowan.name>
681
682         * Makefile.am: -I foo -> -Ifoo.
683
684 2008-04-24  Micah Cowan  <micah@cowan.name>
685
686         * main.c: Revised usage description of --convert-links to apply
687         to CSS as well as to HTML.
688
689 2008-04-23  Micah Cowan  <micah@cowan.name>
690
691         * utils.c (test_dir_matches_p): Added a test for the case
692         described in issue #20518.
693
694 2008-04-22  Micah Cowan  <micah@cowan.name>
695
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
698         be parsed.
699
700 2008-04-22  Ted Mielczarek  <ted.mielczarek@gmail.com>
701
702         * css.lex, css-url.c, css-url.h: Added to implement support for
703         parsing CSS in Wget.
704         * convert.c: Convert links in CSS files, too.
705         * convert.h (convert_options): Added for options link_css_p,
706         link_expect_css.
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
711         content.
712         * html-url.h: Added.
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
719         position and size.
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
731         to wget_SOURCES.
732
733 2008-04-22  Jim Paris  <jim@jtan.com>
734
735         * openssl.c (ssl_init): Enable combined certificate/key in
736         single file (apparent regression from ~1.9). Resolves issue
737         #22767.
738
739 2008-04-22  Steven Schubiger  <schubiger@gmail.com>
740
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.
745
746 2008-04-22  Pranab Shenoy  <pranab.loosinit.shenoy@gmail.com>
747
748         * init.c: Added test_commands_sorted unit test to check is
749         commands are sorted.  Fixes bug #21245.
750
751         * test.c: Added test_commands_sorted to the test suite.
752
753 2008-04-22  Rabin Vincent  <rabin@rab.in>
754
755         * ftp.c (ftp_get_listing): Only remove .listing if it has been
756         created. 
757
758 2008-04-22  Alain Guibert  <alguibert+bts@free.fr>
759
760         * test.h (mu_run_test): Move declaration before statements, for
761         C90 conformance. Fixes bug #22789.
762
763 2008-04-22  Mike Frysinger  <vapier@gentoo.org>
764
765         * Makefile.am: Move @LIBS@ after other libraries, for better
766         static-linking support. Fixes bug #22143.
767
768 2008-04-16  Steven Schubiger  <schubiger@gmail.com>
769
770         * ftp.c: Use Gnulib's quote function for printing filenames and
771         such.
772         * connect.c: Likewise.
773         * convert.c: Likewise.
774         * cookies.c: Likewise.
775         * ftp-opie.c: Likewise.
776         * gnutls.c: Likewise.
777         * init.c: Likewise.
778         * log.c: Likewise.
779         * mswindows.c: Likewise.
780         * openssl.c: Likewise.
781         * progress.c: Likewise.
782         * recur.c: Likewise.
783         * res.c: Likewise.
784         * utils.c: Likewise.
785
786 2008-04-16  Steven Schubiger  <schubiger@gmail.com>
787
788         * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE 
789         out, because they're now defined independently by config.h.
790
791 2008-04-14  Steven Schubiger  <schubiger@gmail.com>
792
793         * http.c: Use Gnulib's quote function for printing filenames and
794         such.
795         * wget.h: #include "quote.h".
796
797 2008-04-12  Rabin Vincent  <rabin@rab.in>
798
799         * mswindows.c (fake_fork_child): Don't create a logfile for
800         --background when --quiet is used, but not --server-response.
801         Fixes bug #20917.
802
803         * utils.c (fork_to_background): Likewise.
804
805 2008-04-12  Micah Cowan  <micah@cowan.name>
806
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
810         anyway).
811
812 2008-04-11  Alexander Dergachev  <cy6erbr4in@gmail.com>
813
814         * utils.c (aprintf): Now we are setting limits (1 Mb) for text
815         buffer when we use non-C99 vsnprintf.
816         
817 2008-04-11  Micah Cowan  <micah@cowan.name>
818
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
822         suggested fix!
823
824 2008-04-10  Alexander Dergachev  <cy6erbr4in@gmail.com>
825
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.
829
830 2008-03-19  Micah Cowan  <micah@cowan.name>
831
832         * utils.c (test_dir_matches_p): More tests related for
833         dir_matches_p.
834
835 2008-03-17  Micah Cowan  <micah@cowan.name>
836
837         * connect.c: Include sys/time.h to support use of the select
838         function on older systems.
839
840 2008-02-11  Benno Schulenberg  <bensberg@justemail.net>
841
842         * http.c: More accurate and descriptive messages for when a file
843         won't be retrieved during spider-mode.
844
845 2008-02-10  Micah Cowan  <micah@cowan.name>
846
847         * http.c: Added existence_checked member to the http_stat
848         struct.
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
858         bug #22242.
859
860 2008-02-07  Micah Cowan  <micah@cowan.name>
861
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).
865
866 2008-02-06  Micah Cowan  <micah@cowan.name>
867
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
871         NLS progress-bars.
872         * wget.h: Determine whether to use NLS for progress-bars, based
873         on whether wcwidth and mbtowc are available.
874
875 2008-02-03  Micah Cowan  <micah@cowan.name>
876
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
882         create_image.
883         * http.c (http_loop): Put no-clobber logic back into http_loop,
884         before starting to fetch, for when we're not doing
885         content-disposition.
886
887 2008-01-31  Micah Cowan  <micah@cowan.name>
888
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.
893
894 2008-01-25  Micah Cowan  <micah@cowan.name>
895
896         * main.c: Added notes to translators regarding (C), diacritics
897         in names.
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.
908
909 2007-12-10  Micah Cowan  <micah@cowan.name>
910
911         * main.c: The option is --content-disposition, not
912         --no-content-disposition (at the moment).
913
914 2007-12-08  Hrvoje Niksic  <hniksic@xemacs.org>
915
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.
920
921 2007-12-07  Micah Cowan  <micah@cowan.name>
922
923         * Makefile.am: Plug in vars to include stuff from
924         $(top_srcdir)/md5 when appropriate.
925
926 2007-12-05  Micah Cowan  <micah@cowan.name>
927
928         * utils.c (subdir_p): Handle the case where d1 is "".
929         * convert.c (convert_all_links): Don't return without
930         deallocating timer.
931
932 2007-11-28  Micah Cowan  <micah@cowan.name>
933
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.
946
947 2007-10-30  Micah Cowan  <micah@cowan.name>
948
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.
952
953 2007-10-22  Gisle Vanem  <gvanem@broadpark.no>
954
955         * mswindows.c: Move INHIBIT_WRAP macro definition up with wget.h
956         inclusion.
957
958 2007-10-18  Steven Schweda  <sms@antinode.org>
959
960         * sysdep.h: #include <stdint.h> as well as <inttypes.h>, to work
961         around a glitch on Tru64 systems.
962
963 2007-10-18  Micah Cowan  <micah@cowan.name>
964
965         * Makefile.am: version.c should not be distributed. Removed
966         config-post.h. Add version.c dependency and gnulib include path
967         for libunittest.a.
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
977         config.h.
978
979 2007-10-15  Micah Cowan  <micah@cowan.name>
980
981         * Makefile.am: Remove intermediary hg-id file generation, make
982         version.c-generation more portable.
983
984 2007-10-14  Micah Cowan  <micah@cowan.name>
985
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
994         robots.txt fails.
995         * main.c (main): --spider or --delete-after now implies
996         --no-directories (thanks, Josh Williams).
997
998 2007-10-14  Joshua David Williams  <yurimxpxman@gmail.com>
999
1000         * recur.c (download_child_p): Remove robots.txt if
1001         --delete-after or --spider is on.
1002
1003 2007-10-13  Micah Cowan  <micah@cowan.name>
1004
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
1008         these.
1009
1010 2007-10-10  Micah Cowan  <micah@cowan.name>
1011
1012         * http-ntlm.c: Include openssl/opensslv.h explicitly, instead of
1013         hoping it'll be included by accident in openssl/des.h.
1014
1015 2007-10-09  Gisle Vanem  <gvanem@broadpark.no>
1016
1017         * mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer
1018         needed.  Hence simply the prototype. Free 'exec_name' at exit.
1019
1020 2007-10-09  Micah Cowan  <micah@cowan.name>
1021
1022         * gettext.h: Imported from /usr/share/gettext, fuller handling
1023         of --disable-nls.
1024         * wget.h: Remove logic for handling lack of NLS (now in
1025         gettext.h).
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
1029         to LIBS).
1030
1031 2007-10-08  Micah Cowan  <micah@cowan.name>
1032
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).
1038
1039 2007-10-04  Micah Cowan  <micah@cowan.name>
1040
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.
1046
1047 2007-10-02  Gisle Vanem  <gvanem@broadpark.no>
1048         
1049         * ftp.c: Use "_listing" for MSDOS (".listing" is illegal).
1050
1051         * url.c: Update comment for 'filechr_not_windows'.
1052
1053         * utils.c: Include <process.h> for 'getpid()' on Watcom.
1054
1055 2007-10-02  Micah Cowan  <micah@cowan.name>
1056
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
1061         <sms@antinode.org>.
1062         * http.c (gethttp): Warn about host lookup failures. Adjusted
1063         from Stephen Gildea's patch.
1064
1065 2007-10-02  Stephen Gildea  <stepheng+wget@gildea.com>
1066
1067         * connect.c (connect_to_host): Warn about host lookup failures.
1068
1069 2007-09-25  Micah Cowan  <micah@cowan.name>
1070
1071         * Makefile.in: Use EXEEXT instead of exeext.
1072
1073 2007-09-24  Gisle Vanem  <giva@bgnett.no>
1074
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.
1077
1078 2007-09-24  Jochen Roderburg  <roderburg@uni-koeln.de>
1079
1080         * http.c (http_zero): Remove no-longer-used local_size variable.
1081         Fixes bug #21057.
1082
1083 2007-09-12  Micah Cowan  <micah@cowan.name>
1084
1085         * http.c (http_loop): Remove send_head_first from condition for
1086         parsing timestamp.
1087
1088 2007-08-29  Micah Cowan  <micah@cowan.name>
1089
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
1093         inefficient.
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.
1098
1099 2007-08-27  Gisle Vanem  <giva@bgnett.no>
1100
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.
1114
1115 2007-08-27  Micah Cowan  <micah@cowan.name>
1116
1117         * wget.h: Added macro replacement for ngettext, for environs
1118         that lack NLS.
1119
1120 2007-08-26  Micah Cowan  <micah@cowan.name>
1121
1122         * spider.c (print_broken_links): Fixed incorrect plurals msgid
1123         usage, switched to use ngettext function.
1124
1125 2007-08-24  Micah Cowan  <micah@cowan.name>
1126
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
1142         them is NULL.
1143
1144 2007-08-23  Joshua David Williams  <yurimxpxman@gmail.com>
1145
1146         * spider.c (in_url_list_p): Removed the bool verbose argument
1147
1148 2007-08-22  Mauro Tortonesi  <mauro@ferrara.linux.it>
1149
1150         * http.c (http_loop): Fall back to GET if HEAD fails with a 500 or 501
1151         error code.
1152
1153 2007-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
1154         
1155         * http.c (http_loop): Send preliminary HEAD request if -N is given and
1156         the destination file exists already.
1157
1158 2007-08-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
1159
1160         * http.c (http_loop): Fixed HTTP HEAD requests logic when --spider is
1161         given.
1162
1163 2007-08-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1164
1165         * url.c (append_uri_pathel): Do not assume dest string to be
1166         zero-terminated.
1167         (test_append_uri_pathel): Terminate string to fix test failure.
1168
1169 2007-08-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1170
1171         * url.c (url_string): Use comparison, not assignment, in
1172         check for auth_mode == URL_AUTH_HIDE_PASSWD.
1173
1174 2007-08-09  Micah Cowan  <micah@cowan.name>
1175
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
1178         from the HEAD.
1179
1180 2007-08-08  Micah Cowan  <micah@cowan.name>
1181
1182         * init.c (defaults): Content disposition will not be default,
1183         since it currently results in extra round-trips.
1184
1185 2007-07-31  Micah Cowan  <micah@cowan.name>
1186
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().
1190
1191 2007-07-29  Micah Cowan  <micah@cowan.name>
1192
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.
1199
1200 2007-07-28  Micah Cowan  <micah@cowan.name>
1201
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.
1209
1210 2007-07-25  Micah Cowan  <micah@cowan.name>
1211
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.
1227
1228 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
1229
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
1234
1235 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
1236
1237         * test.h: tests made more verbose; now displays the name
1238         of each test run.
1239
1240 2007-07-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
1241
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.
1245
1246 2007-07-05  Micah Cowan  <micah@cowan.name>
1247
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
1261         address.
1262
1263 2007-07-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
1264
1265         * http.c (http_loop): Skip HEAD request and start immediately with GET
1266         if -O is given.
1267
1268 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1269
1270         * http.c (print_server_response): Escape non-printable characters
1271         in server respone.
1272
1273 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1274
1275         * netrc.c: Don't make netrc_list static, as it prevents
1276         compilation with DEBUG_MALLOC.
1277
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
1280         coming from us.
1281
1282 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
1283
1284         * cookies.c (parse_set_cookie): Would erroneously discard cookies
1285         with unparsable expiry time.
1286
1287 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
1288
1289         * progress.c (create_image): Check for ETA overflow.
1290         (print_row_stats): Ditto.
1291
1292 2007-01-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
1293
1294         * init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc
1295         warning about strict-aliasing violation.
1296
1297 2007-01-09  Steven M. Schweda  <sms@antinode.org>
1298
1299         * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.
1300
1301 2006-12-29  Gisle Vanem  <giva@bgnett.no>
1302
1303         * mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
1304
1305 2006-12-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
1306
1307         * http.c (parse_content_disposition): Consider directory prefix, if
1308         specified.
1309
1310 2006-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
1311
1312         * retr.c (retrieve_from_file): Ditto.
1313         (url_uses_proxy): New function.
1314
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.
1318
1319 2006-10-17  Mike Grant  <mggr@pml.ac.uk>
1320
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.
1324
1325 2006-10-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
1326
1327         * convert.c (downloaded_file): Fixed bug which used to break -E -k -K 
1328         mode.
1329
1330 2006-08-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1331
1332         * http.c: #include'd spider.h to get rid of compiler warnings.
1333
1334         * main.c: Ditto.
1335
1336         * recur.c: Ditto.
1337
1338 2006-08-24  Mauro Tortonesi  <mauro@ferrara.linux.it>
1339
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.
1342
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.
1347
1348         * recur.c: Ditto.
1349
1350         * res.c (res_retrieve_file): Disable opt.timestamping and opt.spider
1351         when retrieving robots.txt. Updated copyright information.
1352
1353         * convert.c: Moved code tracking broken links to spider.c.
1354
1355         * convert.h: Ditto.
1356
1357         * spider.c: Created new file to keep track of visited URLs in spider
1358         mode.
1359
1360         * spider.h: Ditto.
1361
1362 2006-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
1363
1364         * http.c: Fixed timestamping-related bug.
1365
1366 2006-08-16  Mauro Tortonesi  <mauro@ferrara.linux.it>
1367
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.
1371
1372 2006-08-08  Hrvoje Niksic  <hniksic@xemacs.org>
1373
1374         * utils.c (datetime_str): Avoid code repetition with time_str.
1375
1376 2006-07-21  Hrvoje Niksic  <hniksic@xemacs.org>
1377
1378         * init.c (commands): Correctly place "contentdisposition".
1379
1380 2006-07-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
1381         
1382         * sysdep.h: If intptr_t isn't defined, simply typedef it to long.
1383
1384         * http.c: Added explicit cast to int in logprintf call to remove
1385         compiler warnings on 64-bit platforms.
1386
1387         * connect.c: Added a few casts to intptr_t to remove compiler warnings
1388         on 64-bit platforms.
1389         
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.
1392         
1393         * all: Update copyright information.
1394         
1395 2006-07-10  KJKHyperion  <hackbunny@reactos.com>
1396
1397         * url.c (filechr_table): Mark DEL (0x7f) as a control character
1398         and | as a character Windows can't handle.
1399
1400 2006-06-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1401
1402         * res.c: Implemented is_robots_txt_url function for detection of
1403         robots.txt URLs and related test routine.
1404
1405         * res.h: Ditto.
1406
1407         * url.c: Implemented are_urls_equal function for URL comparison and
1408         related testing routine.
1409
1410         * url.h: Ditto.
1411
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.
1415
1416         * test.c: Call tests routines for are_urls_equal and 
1417         is_robots_txt_url.
1418
1419 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1420
1421         * wget.h (wgint): Typedef to any 64-bit (or larger) type we can
1422         find, not necessarily off_t or long.
1423
1424 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1425
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.
1429
1430 2006-06-21  Hrvoje Niksic  <hniksic@xemacs.org>
1431
1432         * utils.c (base64_encode): Cast void pointer to char * before
1433         doing arithmetic.
1434
1435 2006-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
1436
1437         * utils.c (base64_encode): Made TBL const.
1438         (base64_decode): Made the base64_char_to_value table const.
1439
1440 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
1441
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.
1446
1447 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
1448
1449         * utils.c (base64_encode): Would read past end of STR.
1450         Reported by rick@eckle.org.
1451
1452 2006-06-13  Mauro Tortonesi  <mauro@ferrara.linux.it>
1453
1454         * options.h (struct options): Introduced member restrict_files_case to
1455         keep track of preferences on character case restrictions for
1456         filenames.
1457
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.
1461
1462         * url.c: Modified append_uri_pathel to support character case
1463         restrictions for filenames. Added test_append_uri_pathel unit test.
1464
1465         * test.c: Added test_cmd_spec_restrict_file_names and
1466         test_append_uri_pathel to the list of unit tests to run.
1467
1468 2006-06-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
1469
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
1472         proxy.
1473
1474         * main.c: Automatically turn on opt.follow_ftp in case of recursive
1475         FTP retrieval through HTTP proxy.
1476
1477 2006-06-12  Tony Lewis  <tlewis@exelana.com>
1478
1479         * main.c: Improved CHEN Peng's patch by proposing a simpler logic.
1480
1481 2006-06-12  CHEN Peng  <chenpeng@alumni.nus.edu.sg>
1482
1483         * main.c: Use retrieve_tree in case of recursive FTP retrieval through
1484         HTTP proxy.
1485
1486 2006-05-25  Mauro Tortonesi  <mauro@ferrara.linux.it>
1487
1488         * convert.c: Added mechanisms to keep track broken links.
1489
1490         * convert.h: Ditto.
1491
1492         * wget.h: Reordered and enumerated uerr_t constants.
1493
1494         * recur.c: Fixes to support recursive spider mode.
1495
1496         * http.c: Ditto.
1497
1498         * main.c: Print broken links in case of recursive spider mode.
1499
1500         * retr.c: Changed interface of retrieve_url.
1501
1502         * retr.h: Ditto.
1503
1504         * ftp.c: Changed interface of ftp_loop.
1505
1506         * ftp.h: Ditto.
1507
1508         * res.c: Minor change to reflect changes in interface of retrieve_url.
1509
1510 2006-05-18  Lawrence Jones  <lawrence.jones@ugs.com>
1511
1512         * ftp-ls.c (ftp_parse_unix_ls): Correct size parsing, add size
1513         and filename debugging output.
1514
1515 2006-04-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1516
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.
1520
1521         * options.h: Added option --no-content-disposition to disable parsing
1522         of HTTP Content-Disposition header.
1523
1524         * init.c: Ditto.
1525         
1526         * main.c: Ditto.
1527
1528 2006-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
1529
1530         * hash.c (TOLOWER): Wrap macro arg in parentheses.
1531
1532 2006-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
1533
1534         * http.c (parse_content_disposition): Doc fix.
1535
1536 2006-03-15  Mauro Tortonesi  <mauro@ferrara.linux.it>
1537
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.
1543
1544         * utils.h: Changed all frontcmp occurrences to subdir_p.
1545         
1546         * recur.c: Ditto.
1547         
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
1550         tests to run.
1551
1552         * http.c (test_parse_content_disposition): Changed return type from
1553         char * to const char *. 
1554
1555 2006-03-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
1556
1557         * recur.c (struct queue_element): Changed type of html_allowed member
1558         to bool.
1559         
1560 2006-03-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
1561
1562         * ftp.c (ftp_list): Try `LIST -a' command first and revert to `LIST'
1563         in case of failure.
1564
1565 2006-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
1566
1567         * hash.c (TOLOWER): Fix definition when STANDALONE.
1568         Reported by Beni Serfaty.
1569
1570 2006-03-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
1571
1572         * http.c (http_loop): Fixed recursive HTTP retrieval.
1573
1574 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
1575
1576         * http.c (extract_param): Declare extern so it can be used from
1577         other files.
1578         (extract_param): Return error for empty name.
1579
1580 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
1581
1582         * url.c (find_last_char): Define in terms of memrchr.
1583
1584         * cmpt.c (memrchr): Define it on systems that don't have it.
1585
1586         * http.c (extract_param): New function for parsing header values
1587         with parameters.
1588         (parse_content_disposition): Use it.  Don't allow slashes and
1589         backslashes in the file name.
1590
1591 2006-02-27  Hrvoje Niksic  <hniksic@xemacs.org>
1592
1593         * url.c (path_simplify): Don't preserve ".." at beginning of path.
1594         Suggested by Frank McCown.
1595
1596 2006-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
1597
1598         * http.c (gethttp): Only use FILE.N.html if FILE.html exists.
1599
1600 2006-02-09  Hrvoje Niksic  <hniksic@xemacs.org>
1601
1602         * mswindows.c (run_with_timeout): Made thread_hnd non-static.
1603
1604 2006-02-05  Hrvoje Niksic  <hniksic@xemacs.org>
1605
1606         * retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of
1607         the specified wait period.
1608
1609 2006-02-03  Hrvoje Niksic  <hniksic@xemacs.org>
1610
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
1613         digit.
1614         (number_to_string): Removed the SPRINTF_WGINT macro.
1615
1616 2006-02-03  Mauro Tortonesi  <mauro@ferrara.linux.it>
1617
1618         * http.c: Fixed support for Content-Disposition header.
1619
1620         * test.c: Added test_parse_content_disposition to the list of unit
1621         tests to run.
1622
1623 2006-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1624
1625         * hash.c: Don't define countof if it's already defined.
1626
1627         * hash.c: Obtain the definition of uintptr_t when standalone.
1628
1629 2006-01-30  Mauro Tortonesi  <mauro@ferrara.linux.it>
1630
1631         * http.c: Changed output format. Removed excessively verbose debugging
1632         output.
1633
1634 2005-12-07  Mauro Tortonesi  <mauro@ferrara.linux.it>
1635
1636         * http.c: Fixed pre-download verbose output which was broken by 
1637         HTTP code refactoring.
1638
1639 2005-11-23  Mauro Tortonesi  <mauro@ferrara.linux.it>
1640
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. 
1645
1646 2005-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
1647
1648         * hash.c (INVALID_PTR): Use uintptr_t instead of unsigned long.
1649         (hash_pointer): Don't assume a pointer fits in `unsigned long'.
1650
1651 2005-11-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
1652
1653         * Makefile.in: Removed support for unit testing (now it is in
1654         tests/Makefile.in).
1655
1656 2005-10-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
1657
1658         * Makefile.in: Added basic support for unit testing.
1659
1660         * test.c: Ditto.
1661         
1662         * test.h: Ditto.
1663         
1664 2005-10-13  Daniel Stenberg  <daniel@haxx.se>
1665
1666         * http-ntlm.c (ntlm_output): Fixed buffer overflow vulnerability.
1667
1668 2005-10-09  Russ Allbery  <rra@stanford.edu>
1669
1670         * snprintf.c: Remove round to round_int and pow10 to pow10_int, to
1671         avoid warnings from GCC 4.0.
1672
1673 2005-10-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
1674
1675         * retr.c: Changed semantics of no_proxy_match.
1676
1677 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1678
1679         * main.c (main): Don't print the summary if nothing has been downloaded.
1680
1681 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1682
1683         * retr.c (retr_rate): Rename parameter from MSECS to SECS since it
1684         no longer holds milliseconds.
1685
1686 2005-09-01  Hrvoje Niksic  <hniksic@xemacs.org>
1687
1688         * progress.c: Introduce symbolic constants for "magic" values of
1689         0.2 and 0.9, REFRESH_INTERVAL and ETA_REFRESH_INTERVAL.
1690
1691 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
1692
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.
1696
1697 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
1698
1699         * hash.c (hash_table_map): Rename to hash_table_for_each and
1700         update callers.
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.
1707
1708 2005-08-26  Albert Chin  <wget@mlists.thewrittenword.com>
1709
1710         * Makefile.in: Use @datadir@.  Define localedir as $(datadir)/locale.
1711
1712 2005-08-26  Jeremy Shapiro  <jnshapiro@gmail.com>
1713
1714         * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY.
1715
1716 2005-08-23  Hrvoje Niksic  <hniksic@xemacs.org>
1717
1718         * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA.
1719
1720 2005-08-12  Hrvoje Niksic  <hniksic@xemacs.org>
1721
1722         * wget.h: Renamed strtoll_return to strtoll_type.
1723
1724 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
1725
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.)
1729
1730 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
1731
1732         * cmpt.c (strtoll): Define it if missing on the system and if Wget
1733         needs it.
1734
1735         * mswindows.c (str_to_int64): Move to cmpt.c and rename to strtoll.
1736
1737 2005-08-10  Hrvoje Niksic  <hniksic@xemacs.org>
1738
1739         * host.c (print_address): Always use inet_ntop when IPv6 is
1740         enabled.
1741
1742         * host.h (ip_address): Simplify the data union.
1743
1744 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
1745
1746         * mswindows.c (inet_ntop): Also handle IPv4 addresses for
1747         completeness.
1748
1749 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
1750
1751         * http.c (gethttp): Don't read more than the amount of data
1752         specified by the content-length header.
1753
1754 2005-08-09  Vasil Dimov  <vd@datamax.bg>
1755
1756         * ftp.c (getftp): Don't free RESPLINE if ftp_response returns a
1757         status other than FTPOK.
1758
1759 2005-08-04  Giuseppe Bonacci  <g.bonacci@libero.it>
1760
1761         * ftp-ls.c (ftp_parse_unix_ls): Remember the position of the
1762         previous token instead of backtracking back to it.
1763
1764 2005-07-08  Gisle Vanem  <giva@bgnett.no>
1765
1766         * mswindows.h: Include process.h to get getpid() declaration.
1767
1768 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
1769
1770         * utils.c (aprintf): Use vasprintf where available.
1771
1772 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
1773
1774         * url.c (rewrite_shorthand_url): Simplify code using aprintf and
1775         strspn.
1776
1777 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1778
1779         * gnutls.c (ssl_check_certificate): Check for the validity of the
1780         presented X509 certificate.
1781
1782 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1783
1784         * openssl.c (ssl_check_certificate): Print custom error messages
1785         for frequent X509 certificate problems.
1786
1787 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1788
1789         * mswindows.h: Define an alias for stat and fstat, as requested by
1790         config-compiler.h.
1791         (gai_strerror): Define to windows_strerror if NEED_GAI_STRERROR is
1792         defined.
1793
1794 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1795
1796         * mswindows.h: Use strtoll where available.
1797
1798 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1799
1800         * sysdep.h: Add a full declaration of fnmatch.h.
1801
1802 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1803
1804         * utils.c: Unconditionally include <setjmp.h>.
1805
1806 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1807
1808         * utils.c (fnmatch_nocase): New function.
1809         (proclist): Use it instead of fnmatch when opt.ignore_case is
1810         requested.
1811         (in_acclist): Respect opt.ignore_case.
1812         (frontcmp): Respect opt.ignore_case.
1813
1814         * options.h (struct options): New flag opt.ignore_case.
1815
1816 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1817
1818         * ptimer.c: Measure time in seconds rather than milliseconds.
1819         Adjusted all callers.
1820
1821 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1822
1823         * http.c (gethttp): When freeing MESSAGE, take into account that
1824         it can be NULL.
1825
1826 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1827
1828         * cmpt.c (timegm): Handle years after 2099.
1829
1830 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1831
1832         * cmpt.c (timegm): Remove unused variable.
1833
1834 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1835
1836         * cmpt.c (timegm): Don't call mktime; simply count the seconds
1837         between 1970-01-01 and the specified date.
1838
1839 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1840
1841         * wget.h (or): Define HAVE_SSL when either HAVE_OPENSSL or
1842         HAVE_GNUTLS are defined.
1843
1844         * gnutls.c: New file.
1845
1846 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1847
1848         * http.c (gethttp): Don't print the request write error message
1849         twice.
1850
1851 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1852
1853         * openssl.c (openssl_errstr): Instead of always using a large
1854         static buffer, only allocate the error string when there is an
1855         actual error.
1856
1857 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1858
1859         * xmalloc.c (debugging_free): Prefix hex pointer value with "0x"
1860         when printing.
1861
1862 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1863
1864         * utils.c (NEXT_BASE64_CHAR): Rename to NEXT_CHAR and simplify to
1865         get the next non-whitespace character.
1866
1867 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1868
1869         * utils.c (base64_decode): Don't silently tolerate non-base64
1870         non-white-space characters in the base64 stream.
1871
1872 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1873
1874         * connect.c (LAZY_RETRIEVE_INFO): Make last_tick unsigned to match
1875         transport_map_modified_tick.
1876
1877 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1878
1879         * config-post.h (alloca): Updated declaration to not enumerate all
1880         Windows compilers.
1881
1882 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1883
1884         * openssl.c (openssl_errstr): Separate error messages with "; ".
1885
1886 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1887
1888         * ftp.c (getftp): Ditto.
1889
1890         * http.c (gethttp): Use fd_errstr.
1891
1892         * connect.c (fd_register_transport): Restructure parameters to
1893         include only a single structure that describes transport
1894         implementation.
1895
1896         * openssl.c (openssl_errstr): New function: dump SSL error strings
1897         into a static buffer and return a pointer to the buffer.
1898
1899         * connect.c (fd_errstr): New function; returns transport-specific
1900         error message, or strerror(errno) if transport doesn't supply one.
1901
1902 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1903
1904         * mswindows.h: Also wrap accept() and listen().
1905
1906 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1907
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.
1911
1912 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1913
1914         * host.c: Don't include "connect.h" now that we no longer have
1915         socket_has_inet6.
1916
1917 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1918
1919         * host.c: Remove extraneous definition of netdb.h.
1920
1921 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1922
1923         * http.c (gethttp): Skip error message body in the keep-alive
1924         case.
1925
1926 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1927
1928         * url.c (url_parse): Would crash when parsing fragments.  Support
1929         fragments for FTP URLs too.
1930
1931 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1932
1933         * version.c: Don't use "cvs" in version name, since we're not
1934         using CVS anymore.
1935
1936 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1937
1938         * progress.c (create_image): Ditto.
1939
1940         * retr.c (retr_rate): Display smaller rate numbers with greater
1941         precision.
1942
1943 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1944
1945         * http.c (response_head_terminator): Minor optimization.
1946
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
1949         callers.
1950
1951 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
1952
1953         * url.c (url_parse): Make sure u->params is not initialized for
1954         http/https URLs.
1955         (url_parse): Don't crash on garbage following []-delimited IPv6
1956         addresses.
1957
1958 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
1959
1960         * main.c (print_help): Don't refer to the non-existent -nr in
1961         description of --mirror.
1962
1963 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
1964
1965         * host.c (pretty_print_address): Renamed to just print_address.
1966         Clarify documentation.
1967
1968 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
1969
1970         * http.c (gethttp): Explicitly document the different cases when
1971         generating the Host header.
1972
1973 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
1974
1975         * host.c (pretty_print_address): Handle error result from
1976         inet_ntop.
1977
1978 2005-06-30  Gisle Vanem  <giva@bgnett.no>
1979
1980         * mswindows.c (inet_ntop): New function.  Print IPv6 addresses
1981         using WSAAddressToString.
1982
1983 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1984
1985         * progress.c (dot_update): Remove unused variable row_qty.
1986
1987 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1988
1989         * main.c: Check for both SIGHUP and SIGUSR1 before using them.
1990
1991 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1992
1993         * utils.c: Unconditionally include locale.h.
1994
1995 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1996
1997         * ptimer.c: Include sys/time.h to get struct timeval.
1998
1999 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2000
2001         * wget.h: Remove obsolete definition of with_thousand_seps_sum.
2002
2003 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2004
2005         * gnu-md5.h: Unconditionally include limits.h.
2006
2007 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2008
2009         * utils.c (random_number): Use lrand48 if available.
2010         (random_float): Use drand48 if available.
2011
2012 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2013
2014         * main.c (secs_to_human_time): Use print_decimal when printing
2015         total download time in seconds.
2016
2017         * progress.c (print_row_stats): Use it to print total download
2018         time at the end of the download.
2019         (create_image): Ditto.
2020
2021         * utils.c (print_decimal): New function; print small decimal
2022         numbers with more precision than large ones.
2023
2024         * progress.c (print_row_stats): New function.  Print ETA after the
2025         download rate at the end of each row.
2026
2027 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2028
2029         * init.c (parse_line): Check for alphanumerics.
2030
2031 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2032
2033         * (dot_create): Remove unnecessary casts.
2034
2035 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2036
2037         * ftp.c (getftp): Delete trailing newlines from LIST output so
2038         lines don't come out with trailing \015\012 with -S.
2039
2040 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2041
2042         * mswindows.h: Remove superfluous includes.
2043
2044 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2045
2046         * config-post.h (alloca): Amend alloca declaration to take care of
2047         all Win32 compilers, not just MSVC and MinGW.
2048
2049 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2050
2051         * utils.c (get_grouping_data): Force separator to "." rather than
2052         " " when "," is taken.
2053
2054 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2055
2056         * wget.h (PTR_FORMAT): Cast the result of sizeof to int before
2057         passing it to printf's %*.
2058
2059         * retr.h: Declare output_stream and output_stream_regular.
2060
2061         * ftp.h: Declare ftp_last_respline.
2062
2063         * convert.h: Declare dl_url_file_map.
2064
2065         * http.h: New file.
2066
2067 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2068
2069         * cookies.c: Make cookies_now static.
2070
2071 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2072
2073         * utils.c (human_readable): Remove intermediary cast to long; MSVC
2074         has problems casting *unsigned* __int64 to double.
2075
2076 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2077
2078         * sysdep.h: Use the system-provided fnmatch by default.
2079
2080 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2081
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.
2085
2086 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2087
2088         * http.c (http_atotm): Correctly query the old locale value.
2089
2090 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2091
2092         * config-post.h (alloca): Don't #define alloca under MinGW32,
2093         which defines it in malloc.h, included from mswindows.h.
2094
2095 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2096
2097         * utils.c (get_grouping_data): Force the use of separators in C
2098         locale.
2099
2100 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2101
2102         * main.c (i18n_initialize): Set all locale categories.
2103
2104         * http.c (http_atotm): Temporarily set locale to "C".
2105
2106 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2107
2108         * http.c (gethttp): Improve "POST data file missing" error
2109         message.
2110
2111 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2112
2113         * progress.c (set_progress_implementation): Type COLON as const
2114         char *.
2115
2116 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2117
2118         * utils.c (with_thousand_seps): Handle negative numbers.
2119
2120 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2121
2122         * progress.c (create_image): Mark the "eta" string for translation.
2123
2124 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2125
2126         * html-url.c (get_urls_file): Don't explicitly set entry->next to
2127         NULL since entry is already zeroed out.
2128
2129 2005-06-26  Gisle Vanem  <giva@bgnett.no>
2130
2131         * mswindows.h: Define gai_strerror under MinGW.
2132
2133 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2134
2135         * utils.c (with_thousand_seps): Correctly implement thousand seps
2136         consisting of more than one character.
2137
2138 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2139
2140         * main.c (secs_to_human_time): Ditto.
2141
2142         * progress.c (create_image): Print more exact duration of very
2143         short downloads.
2144
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
2147         with SI".
2148         (secs_to_human_time): Print really small intervals as 0s, not
2149         0.00s.
2150
2151 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2152
2153         * config-post.h: Replace the alloca declaration with the one from
2154         the latest Autoconf manual.  This should remove a warning with GCC
2155         on AIX.
2156
2157 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2158
2159         * ftp.c (getftp): Always invoke SIZE, not only when continuing a
2160         download.
2161
2162         * main.c (main): Ditto here.
2163
2164         * progress.c (create_image): When the download is finished, print
2165         how long it took.
2166
2167 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2168
2169         * main.c (main): Print the downloaded and quota amounts with the
2170         "human_readable" function.
2171
2172         * ftp.c (print_length): Ditto.
2173
2174         * http.c (gethttp): Don't display thousand separators.
2175
2176         * utils.c (with_thousand_seps): Rewritten to respect locale
2177         settings and to be type size agnostic.
2178
2179 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2180
2181         * utils.c (human_readable): Divide with 1024 instead of shifting
2182         so the operation can work with non-integer N.
2183
2184 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2185
2186         * progress.c (eta_to_human): New logic for more human-readable
2187         ETA.
2188
2189 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2190
2191         * utils.c (with_thousand_seps_sum): Decrease buffer size so it
2192         cannot overrun add_thousand_seps's buffer.
2193
2194 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2195
2196         * utils.c (SPRINTF_WGINT): The correct format is %I64d, not just
2197         %I64.
2198
2199 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2200
2201         * http.c (http_loop): Don't warn about wildcards in HTTP URLs if
2202         globbing isn't requested in the first place.
2203
2204         * retr.c (retrieve_url): Temporarily turn off globbing when
2205         processing HTTP->FTP redirects.
2206
2207 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2208
2209         * utils.c (with_thousand_seps_sum): Now defined only if
2210         SUM_SIZE_INT is double.
2211
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
2215         LARGE_INT_FMT.
2216
2217         * sysdeps.h (LARGE_INT): Renamed to SUM_SIZE_INT to better reflect
2218         its intent, and moved to wget.h.
2219
2220 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2221
2222         * Makefile.in: No need to clean .libs.
2223
2224 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2225
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.
2229
2230 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
2231
2232         * http.c (gethttp): Don't prepend / here.
2233
2234         * cookies.c (cookie_handle_set_cookie): Prepend / to PATH.
2235         (cookie_header): Ditto.
2236
2237 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
2238
2239         * init.c: opt.verbose must be declared as int.
2240
2241 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2242
2243         * cmpt.c (strpbrk): Removed.
2244         (mktime): Removed.
2245         Include <time.h>.
2246
2247 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2248
2249         * utils.c (read_file): Ditto.
2250
2251         * main.c (main): Use struct_fstat.
2252
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!
2255
2256 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2257
2258         * sysdep.h: Remove code that deals with Watcom.
2259
2260 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2261
2262         * all: Use bool instead of int and false/true instead of 0/non-0
2263         for boolean variables and values.
2264
2265 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2266
2267         * sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf.
2268
2269 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2270
2271         * init.c (cmd_lockable_boolean): Removed.
2272
2273 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2274
2275         * cookies.c (struct cookie): Use 1-bit bitfields for booleans
2276         which makes the structure takes less space at no cost in
2277         complexity.
2278
2279 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2280
2281         * Makefile.in ($(OBJ)): Add the config.h dependency.
2282
2283 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2284
2285         * openssl.c, connect.c, host.c: Replace instances of #ifdef
2286         ENABLE_DEBUG if (opt.debug) {...} #endif with IF_DEBUG {...}.
2287
2288         * main.c: Rename the IF_DEBUG defined here to WHEN_DEBUG.
2289
2290         * wget.h (IF_DEBUG): New macro.
2291         (DEBUGP): Define in terms of IF_DEBUG.
2292
2293 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2294
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!
2299
2300 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2301
2302         * connect.c (select_fd): Expect select() to exist.
2303
2304         * utils.c (xsleep): Always use select() as sleep fallback on
2305         non-Windows platforms.
2306
2307         * ptimer.c: Delete the implementation of PTIMER_TIME.
2308
2309         * main.c: Assume existence of signal(), test for different signal
2310         names instead.
2311
2312         * cmpt.c: Better document reasons why certain functions are
2313         included.
2314
2315 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2316
2317         * Makefile.in: Remove the manually maintained dependency list;
2318         make all object files depend on every header.
2319
2320 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2321
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 (...)) ... .
2326
2327 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2328
2329         * main.c, ptimer.c, sysdep.h, utils.c: Use #elif to simplify reading of
2330         chained if-else-else-else-... statements.
2331
2332 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2333
2334         * all: Return type of signal handlers is `void'.  Include signal.h
2335         unconditionally.
2336
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.
2340
2341 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
2342
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.
2346
2347         * cmpt.c (memmove): Remove function mandated by C89.
2348         (strerror): Ditto.
2349         (strstr): Ditto.
2350
2351         * all: Undo the K&R-ization changes from 2005-05-03.
2352
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.
2357
2358 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
2359
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.
2364
2365 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
2366
2367         * http.c (gethttp): Don't free "head" before using it to save
2368         headers.
2369
2370 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
2371
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
2374         necessary.
2375
2376 2005-06-17  Hrvoje Niksic  <hniksic@xemacs.org>
2377
2378         * connect.c (socket_has_inet6): Removed.
2379
2380         * host.c (lookup_host): Don't use the AI_ADDRCONFIG getaddrinfo
2381         hint.
2382
2383 2005-06-16  Hrvoje Niksic  <hniksic@xemacs.org>
2384
2385         * init.c (cmd_lockable_boolean): Improve the error message so it
2386         lists the more useful values first.
2387
2388 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
2389
2390         * http.c (gethttp): Also report the system error when the POST
2391         data file is missing.
2392
2393 2005-06-15  Benno Schulenberg  <benno@nietvergeten.nl>
2394
2395         * ftp.c, http.c, connect.c, cookies.c, html-url.c, init.c, res.c:
2396         Gettext-ize messages that were previously missed.
2397
2398 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
2399
2400         * host.h (ip_address): Remove the trailing comma from the type
2401         enum in the no-IPv6 case.
2402
2403         * main.c (struct cmdline_option): Remove the trailing comma from
2404         the enum.
2405
2406         Reported by Jens Schleusener.
2407
2408 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2409
2410         * url.c (strpbrk_or_eos): Check for a recent GCC version before
2411         using the statement-as-expression extension.
2412
2413 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2414
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).
2418
2419 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2420
2421         * init.c (cmd_spec_header): Don't split the string along the
2422         commas using cmd_vector; just append the new value using
2423         vec_append instead.
2424
2425         * utils.c (vec_append): New function.
2426
2427 2005-05-27  Andreas Beckmann  <debian@abeckmann.de>
2428
2429         * html-url.c (tag_handle_link): Mark the content from the <link
2430         src="..."> tag as expecting HTML.
2431
2432 2005-05-24  Hrvoje Niksic  <hniksic@xemacs.org>
2433
2434         * http.c (http_atotm): Document the origin of the "cookie date"
2435         format.
2436
2437 2005-05-21  Hrvoje Niksic  <hniksic@xemacs.org>
2438
2439         * init.c (setval_internal): Report exact command name alongside
2440         the "display name".
2441
2442 2005-05-18  Hrvoje Niksic  <hniksic@xemacs.org>
2443
2444         * cookies.c (update_cookie_field): Explicitly cast -1 to time_t to
2445         cope with systems where time_t is unsigned.
2446
2447         * cookies.c: Remove unnecessary casts to time_t from values
2448         already of that type.
2449
2450 2005-05-17  Hrvoje Niksic  <hniksic@xemacs.org>
2451
2452         * ftp.c (ftp_loop_internal): Same here.
2453
2454         * http.c (http_loop): Don't clobber the file when -c is specified
2455         and the first attempt to retrieve the file fails.
2456
2457 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2458
2459         * openssl.c (ssl_check_certificate): Print all issues with a
2460         certificate.
2461
2462 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2463
2464         * ftp-basic.c: Don't xfree() the line returned by ftp_response if
2465         the returned code is not FTPOK.
2466
2467 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2468
2469         * init.c (cleanup): Don't free the non-existent opt.ftp_acc.  Free
2470         the SSL-related stuff.
2471
2472 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2473
2474         * ftp.c (print_length): Consistently print \n at end of the
2475         "Length" line.
2476
2477 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
2478
2479         * openssl.c (ssl_connect): Announce the beginning and the end of
2480         the SSL handshake when in debug mode.
2481
2482         * wget.h (PTR_FORMAT): New macro for easier printing of pointer
2483         values.  Use %0*lx along with PTR_FORMAT instead of %p.
2484
2485 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
2486
2487         * http.c (gethttp): Would forget to close the connection when
2488         keep_alive was not used.
2489
2490 2005-05-13  Hrvoje Niksic  <hniksic@xemacs.org>
2491
2492         * openssl.c (pattern_match): Document the code that decides
2493         whether "*" matches ".".
2494
2495 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
2496
2497         * ftp-ls.c (ftp_index): Use %d to print the port number, which is
2498         now int.
2499         From Steven M. Schweda's VMS patches.
2500
2501 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
2502
2503         * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to
2504         "ftp://https//host" when SSL is not used.
2505
2506 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2507
2508         * openssl.c (ssl_check_server_identity): Renamed to
2509         ssl_check_certificate because it does more than just checking the
2510         server's identity.
2511         (ssl_check_certificate): Tell the user about
2512         --no-check-certificate.
2513
2514 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2515
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.
2520
2521 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2522
2523         * openssl.c (pattern_match): New function.
2524         (ssl_check_server_identity): Treat peer certificate common name as
2525         wildcard.
2526
2527 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2528
2529         * openssl.c (ssl_check_server_identity): Print certificate subject
2530         and issuer.
2531
2532 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2533
2534         * res.c (res_register_specs): Correctly pass pointers to
2535         hash_table_get_pair.
2536
2537 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2538
2539         * http.c (gethttp): Call ssl_check_server_identity.
2540
2541         * openssl.c (ssl_check_server_identity): New function, verifies
2542         that the host name in the certificate matches the actual host
2543         name.
2544         (verify_cert_callback): Removed, since it didn't do anything
2545         except returning the preverify_ok argument.
2546
2547         * connect.c (fd_transport_context): Allow retrieval of the context
2548         pointer registered with fd_register_transport.
2549
2550 2005-05-09  Hrvoje Niksic  <hniksic@xemacs.org>
2551
2552         * openssl.c (verify_cert_callback): Renamed from verify_callback.
2553         Always return the received "ok" value.  Print the X509 name in
2554         debug mode.
2555         (ssl_init): Enable partial writes in SSL context.
2556
2557 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2558
2559         * http.c (http_loop): Check for wildcards in the URL path
2560         component, not in the whole URL.
2561
2562         * ftp.c (ftp_loop): Check for wildcards in URL path before
2563         unescaping, so the users can escape globbing metacharacters with %
2564         escapes.
2565
2566 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2567
2568         * init.c (run_command): Correctly interpret the return value of
2569         parse_line.
2570         (commands): Re-alphabetize.
2571
2572 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2573
2574         * netrc.c (parse_netrc): Explicitly check for assignment != NULL
2575         to silence warning from Borland C.
2576
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.
2580
2581 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2582
2583         * log.c (escnonprint_internal): Place variable declarations
2584         before other statements.
2585
2586 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2587
2588         * html-url.c: Include recur.h.
2589
2590         * http.c (request_new): Define as accepting no args.
2591
2592 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2593
2594         * url.c (strpbrk_or_eos): Made inline.  Use strchr(s, '\0') for
2595         finding the NUL char position.
2596
2597 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2598
2599         * url.c (decide_copy_method): Renamed to char_needs_escaping.
2600         Since it now returns only two possible values, change it to return
2601         boolean (int).
2602
2603 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2604
2605         * ftp-basic.c (ftp_request): Prevent newlines in VALUE causing
2606         inadvertent sending of multiple FTP commands.
2607
2608 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2609
2610         * url.c (decide_copy_method): Never cause reencode_escapes to
2611         decode % escapes; it is too intrusive and breaks some servers.
2612
2613 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2614
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
2619         proxies.
2620         Reported by Charles Lane.
2621
2622 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2623
2624         * init.c (cmd_spec_useragent): Allow empty User-Agent.
2625
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.
2630
2631 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2632
2633         * main.c (print_help): Fix wording of --secure-protocol help text.
2634
2635 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2636
2637         * cmpt.c (strstr): Updated from glibc 2.3.5.
2638
2639 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2640
2641         * http.c (http_atotm): Zero out the whole struct tm being passed
2642         to strptime.
2643
2644 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2645
2646         * main.c (main): Propagate option name to setoptval.
2647
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).
2651
2652 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2653
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
2657         encountered.
2658         (initialize): Abort if there have been errors running either
2659         .wgetrc file.
2660
2661 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2662
2663         * log.c (copy_and_escape): Slightly reduce code repetition between
2664         the two loops.
2665
2666 2005-05-05  Charles C.Fu  <ccwf@bacchus.com>
2667
2668         * utils.c (proclist): Strip leading slash when calling fnmatch
2669         too, otherwise wildcard comparisons always fail.
2670
2671 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2672
2673         * utils.c (touch): Set access time to current time.
2674
2675 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2676
2677         * url.c (url_unescape): Don't unescape %00, it effectively
2678         truncates the string.
2679
2680 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2681
2682         * log.c (copy_and_escape): Replace the FOR_URI argument with a
2683         slightly more general mechanism for specifying different kinds of
2684         escape.
2685
2686 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2687
2688         * ftp-basic.c (ftp_response): Fix printing FTP server response.
2689
2690 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2691
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.
2695
2696 2005-05-04  Hrvoje Niksic  <hniksic@xemacs.org>
2697
2698         * wget.h: If gettext was found but libtintl.h wasn't, declare
2699         gettext's return type to avoid type mismatches.
2700
2701 2005-05-03  Hrvoje Niksic  <hniksic@xemacs.org>
2702
2703         * url.c (url_parse): Rename label `error' to avoid conflict with
2704         identifier.
2705
2706         * retr.c (fd_read_body): Rename label `out' to avoid conflict with
2707         identifier.
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
2711         `double' argument.
2712         (no_proxy_match): Define as static, like it is declared.
2713
2714         * progress.c (bar_create): Use 0.0 instead of 0 because K&R
2715         compilers can't automatically promote it.
2716
2717         * http-ntlm.c (ntlm_output): Replace \xHH sequences with \OOO for
2718         the sake of old compilers.
2719
2720         * ftp.c (ftp_loop_internal): Don't use string concatenation.
2721
2722         * http.c (request_send): Use explicit double constants when
2723         calling fd_read and fd_write.
2724         (post_file): Ditto.
2725         (gethttp): Ditto.
2726         (skip_short_body): Ditto.
2727
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
2731         automatically.
2732
2733         * cookies.c (cookie_jar_load): Rename abort label to abort_cookie
2734         to avoid name conflict in K&R compilers.
2735
2736 2005-04-29  Hrvoje Niksic  <hniksic@xemacs.org>
2737
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).
2741
2742 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2743
2744         * ftp.c, hash.c, connect.c, host.c, http.c: Remove unreached code,
2745         such as "break" following return or abort.
2746
2747 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2748
2749         * init.c (commands): Wrap the use of opt.random_file in #ifdef
2750         HAVE_SSL.
2751
2752 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2753
2754         * http.c (gethttp): Correctly set the user agent.
2755
2756 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2757
2758         * init.c (cmd_spec_useragent): Free the old value of
2759         opt.useragent before setting the new one.
2760
2761 2005-04-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
2762
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
2766         string.
2767         
2768 2005-04-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
2769
2770         * ftp.c: Add support for --user and --password.
2771         
2772         * http.c: Add support for --user and --password.
2773         
2774         * init.c: Deprecated ftppasswd, httppasswd, login, passwd and
2775         proxypasswd commands.  Added ftppassword, ftpuser, httppassword,
2776         password, proxypassword and user commands.
2777
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.
2782         
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.
2786
2787 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2788
2789         * main.c (print_help): Advertise "DER", not "ASN1".
2790
2791 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2792
2793         * openssl.c (init_prng): Disable the weak random seed by default.
2794
2795         * http.c (gethttp): Simplify SSL initialization; disable SSL when
2796         anything goes wrong with the initialization.
2797
2798         * options.h (struct options): New option opt.random_file.
2799
2800 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2801
2802         * init.c: Wrap private key commands in IF_SSL.
2803
2804 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2805
2806         * openssl.c (ssl_init): Ditto.
2807
2808         * options.h (struct options): Allow separate specification of key
2809         type and certificate type.
2810
2811         * init.c (cmd_spec_cert_type): Provide a "der" synonym for "asn1"
2812         certificate encoding.
2813
2814 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2815
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.
2819
2820 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2821
2822         * init.c: Renamed "closure" (a synonym for context in some
2823         cultures) to "place", which more accurately reflects the usage.
2824
2825 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2826
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.
2831
2832         * init.c: Renamed SSL command-line arguments and wgetrc commands.
2833         (defaults): Check the server certificate by default.
2834
2835 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2836
2837         * cookies.c (cookie_handle_set_cookie): Delete the part of the
2838         path after the trailing slash.
2839
2840         * http.c (gethttp): Call cookie_handle_set_cookie with path that
2841         begins with '/'.
2842
2843 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2844
2845         * http.c (gethttp): Call skip_short_body only if keep_alive is in
2846         use.
2847         (gethttp): Send the User-Agent header with the CONNECT request as
2848         well.
2849
2850 2005-04-25  Hrvoje Niksic  <hniksic@xemacs.org>
2851
2852         * main.c (option_data): Removed support for the undocumented flag
2853         --use-proxy.
2854
2855 2005-04-25  Hrvoje Niksic  <hniksic@xemacs.org>
2856
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.
2859
2860 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2861
2862         * utils.c (aprintf): Delete unreachable statement.
2863
2864 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2865
2866         * host.c (cmp_prefer_ipv4): New function.
2867         (cmp_prefer_ipv6): New function.
2868         (lookup_host): Use the appropriate comparator according to
2869         opt.prefer_family.
2870
2871         * init.c: New option prefer_family.
2872
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.
2876
2877         * utils.c (stable_sort): New function.
2878
2879 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2880
2881         * connect.c (retryable_socket_connect_error): Return 0 for
2882         ENETUNREACH and EHOSTUNREACH.
2883
2884 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2885
2886         * cmpt.c: Reenable the memmove implementation for systems that
2887         lack it.
2888
2889         * http.c (gethttp): Store the "authorized" state of the persistent
2890         connection.
2891         (request_remove_header): New function.
2892         (gethttp): Don't send the "Basic" authentication if the connection
2893         is already authorized.
2894
2895 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2896
2897         * utils.c (base64_encode): Treat input as unsigned chars.
2898         Required for correct encoding of binary stuff.
2899
2900 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2901
2902         * http-ntlm.c: Format the function definitions in an
2903         ansi2knr-friendly fashion.
2904
2905 2005-04-22  Hrvoje Niksic  <hniksic@xemacs.org>
2906
2907         * http.c (gethttp): Handle multiple WWW-Authentication headers,
2908         only one of which is recognized.  Those are sent by IIS with NTLM
2909         authorization.
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.
2914
2915 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2916
2917         * gen_sslfunc.c (ssl_init): Fix warning message text; mark the
2918         message as translatable.
2919
2920 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2921
2922         * main.c (print_help): Print the EGD option outside the cluster of
2923         SSL options.
2924
2925 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2926
2927         * http-ntlm.c (ntlm_output): Fix setting the domain.
2928         Suggested by Sami Krank.
2929
2930 2005-04-20  Mauro Tortonesi  <mauro@ferrara.linux.it>
2931
2932         * connect.c: Set IPV6_V6ONLY socket option when -6 switch is used.
2933
2934 2005-04-20  FUJISHIMA Satsuki  <sf@FreeBSD.org>
2935
2936         * http.c (request_set_header): Fix the check whether a new header
2937         needs to be allocated.
2938
2939 2005-04-18  Hrvoje Niksic  <hniksic@xemacs.org>
2940
2941         * utils.c (base64_encode): Use the parameter order that makes more
2942         sense.  Return the length of the base64 written.  Updated all
2943         callers.
2944
2945 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
2946
2947         * http.c (request_set_header): Free NAME when VALUE is NULL and
2948         freeing the header name is requested.
2949
2950 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
2951
2952         * snprintf.c (fmtstr): Declare VALUE as const char *.
2953         Based on patch by Russ Allbery.
2954
2955 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
2956
2957         * snprintf.c (fmtfp): More correct handling of significant digit
2958         count with %g -- 0.002 has one significant digit, not three.
2959
2960 2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
2961
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.
2966
2967 2005-04-16  FUJISHIMA Satsuki  <sf@FreeBSD.org>
2968
2969         * http.c (gethttp): Don't use HTTP/1.0 persistent connections over
2970         proxy.
2971
2972 2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
2973
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
2977         it.
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
2983         %g.
2984         (fmtfp): Omit trailing decimal zeros with %g.
2985
2986         * snprintf.c: Don't include <ctype.h> because none of it is used.
2987         Include strings.h/string.h, as per Autoconf.
2988
2989 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
2990
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.
2995
2996 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
2997
2998         * ptimer.c: Check that _POSIX_TIMERS is defined as well as > 0.
2999         Problem reported by Steven M. Schweda.
3000
3001 2005-04-14  Hrvoje Niksic  <hniksic@xemacs.org>
3002
3003         * http.c (skip_short_body): Print the skipped body data in debug
3004         mode.
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.
3008
3009 2005-04-12  Gisle Vanem  <giva@bgnett.no>
3010
3011         * ftp.c (getftp): Ditto.
3012
3013         * http.c (gethttp): Open the output file in binary mode.
3014
3015 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3016
3017         * hash.c: Conditionalize including config.h on HAVE_CONFIG_H
3018         instead of on STANDALONE.
3019
3020 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3021
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.
3026
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.
3031
3032         * retr.c: Don't include SSL headers; we don't need them.
3033
3034 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3035
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.)
3039
3040 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3041
3042         * xmalloc.c (register_ptr): Warn the user to increase SZ prior to
3043         aborting.
3044
3045 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3046
3047         * convert.c (convert_cleanup): Free converted_files.
3048
3049 2005-04-10  Hrvoje Niksic  <hniksic@xemacs.org>
3050
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.
3053
3054 2005-04-10  Hrvoje Niksic  <hniksic@xemacs.org>
3055
3056         * config-post.h: Declare alloca as void *, not char *.
3057
3058 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3059
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.
3064
3065 2004-06-12  Larry Jones <lawrence.jones@ugsplm.com>
3066
3067         * recur.c (download_child_p): Correct the logic in check number 6:
3068         test opt.reclevel (not DEPTH) against INFINITE_RECURSION.
3069
3070 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3071
3072         * url.c: Use "static const" in preference to "const static".
3073         Sun's cc warns that "storage class after type is obsolescent".
3074
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.
3080
3081 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3082
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.
3085
3086 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3087
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.
3093
3094 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3095
3096         * ptimer.c: Use Windows timers under Cygwin, whose POSIX timer
3097         implementation is incomplete.
3098
3099 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3100
3101         * ptimer.c (struct ptimer): Remove the unused initialized field.
3102
3103         * ptimer.c: Renamed function parameters from WT (which used to
3104         stand for wget_timer or wtimer) to PT.
3105
3106 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3107
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.
3112
3113         * ptimer.c: Refactor the code by cleanly separating the
3114         architecture-dependent code from the architecture-independent
3115         code.
3116
3117 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3118
3119         * ptimer.c (ptimer_init): Explicitly check that
3120         _POSIX_MONOTONIC_CLOCK is *both* defined and >=0.  (Undefined
3121         symbols are >=0.)
3122
3123 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3124
3125         * ptimer.c (ptimer_diff): Fix typo affecting Windows build.
3126
3127 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3128
3129         * ptimer.c (ptimer_init): In fact, _POSIX_MONOTONIC_CLOCK needs to
3130         be >= 0.
3131
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.
3135
3136 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3137
3138         * mswindows.c (str_to_int64): Rename OVERFLOW and UNDERFLOW to
3139         INT64_OVERFLOW and INT64_UNDERFLOW, since those names are used.
3140
3141 2005-04-07  Hrvoje Niksic  <hniksic@xemacs.org>
3142
3143         * ptimer.c: New file.  Move the "wtimer" functions from utils.c to
3144         this file and rename them to ptimer_.
3145
3146 2005-04-07  Hrvoje Niksic  <hniksic@xemacs.org>
3147
3148         * host.c (NO_ADDRESS): Define NO_ADDRESS only after the system
3149         headers have been included.
3150
3151 2005-04-06  Hrvoje Niksic  <hniksic@xemacs.org>
3152
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.
3156
3157         * http-ntlm.c: New file, donated by Daniel Stenberg and originally
3158         written for curl, heavily modified for Wget.
3159
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
3163         recode.
3164
3165 2005-04-02  Hrvoje Niksic  <hniksic@xemacs.org>
3166
3167         * ftp.c (ftp_loop): Ditto.
3168
3169         * ftp-basic.c (ftp_pasv): Use the xzero shorthand for memset(0).
3170         (ftp_lpsv): Ditto.
3171
3172 2005-04-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
3173
3174         * Makefile.in: removed string_t.c from list of source files.
3175
3176 2005-04-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
3177
3178         * string_t.c: Removed.
3179         
3180         * string_t.h: Removed.
3181
3182 2005-04-02  Hrvoje Niksic  <hniksic@xemacs.org>
3183
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".
3188
3189 2005-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
3190
3191         * utils.c (number_to_string): Avoid explicit 64-bit constants;
3192         construct them by multiplication at compile-time.
3193
3194         * utils.c, elsewhere: Don't append "L" to 32-bit integer
3195         constants; we aren't really compilable on 16-bit systems anyway.
3196
3197         * hash.c (prime_size): Remove primes larger than 2^31, but include
3198         2^31-1, which is prime.
3199
3200 2005-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
3201
3202         * utils.c (string_set_to_array): New function.
3203
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.
3207
3208 2005-03-29  Hrvoje Niksic  <hniksic@xemacs.org>
3209
3210         * ftp.h (enum): Rename GLOBALL, GETALL, and GETONE to
3211         GLOB_GLOBALL, GLOB_GETALL, and GLOB_GETONE to avoid conflict with
3212         Linux headers.
3213
3214 2005-03-29  Hrvoje Niksic  <hniksic@xemacs.org>
3215
3216         * utils.c (numdigit): More correct handling of negative numbers.
3217
3218 2005-03-21  Hrvoje Niksic  <hniksic@xemacs.org>
3219
3220         * http.c (gethttp): Print the human-readable size.
3221
3222         * ftp.c (getftp): Print the human-readable size of the file to be
3223         downloaded.
3224
3225         * utils.c (human_readable): New function.
3226
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".
3230
3231 2005-03-21  Hrvoje Niksic  <hniksic@xemacs.org>
3232
3233         * http.c (gethttp): Inhibit persistent connections when talking to
3234         proxies, as mandated by RFC 2068.
3235
3236 2005-03-20  Hrvoje Niksic  <hniksic@xemacs.org>
3237
3238         * url.c (unescape_single_char): New function.
3239         (url_escape_dir): Use it to unescape slashes in directory
3240         components.
3241         (url_string): Escape unsafe chars in host name, except for the ':'
3242         charaters, which can appear in IPv6 addresses.
3243
3244         * main.c (main): Don't access the cookie jar directly.
3245
3246         * log.c (escnonprint_internal): Correctly calculate the needed
3247         string size.  Don't forget the buffer's new size after having
3248         reallocated it.
3249         (log_cleanup): New function.  Free the escnonprint ring data.
3250
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
3254         free_vec.
3255
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.
3260
3261         * hash.c: Renamed string_hash to hash_string and ptrhash to
3262         hash_pointer.  Exported hash_pointer.
3263
3264         * xmalloc.c: Organized malloc_table (previously malloc_debug) as a
3265         simple EQ hash table.  register_ptr and unregister_ptr are now of
3266         O(1) complexity.
3267
3268         * xmalloc.c: Renamed "*_debug" to debugging_* and "*_real" to
3269         checking_*.
3270
3271 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3272
3273         * utils.c (debug_test_md5): Moved to gen-md5.c.
3274
3275         * mswindows.h: Don't declare inet_ntop, since we don't use it.
3276
3277         * mswindows.h: For consistency, also wrap closesocket, it being
3278         a Winsock call.
3279
3280         * mswindows.h: Don't declare sleep and usleep; we're defining
3281         xsleep now.
3282
3283         * mswindows.h (mkdir): Don't special-case Borland C, _mkdir
3284         works there as well.
3285
3286         * host.c: Don't include winsock header files; the correct ones
3287         are already included by mswindows.h.
3288
3289         * mswindows.c (xsleep): Round toward the nearest millisecond
3290         in an attempt to avoid average short sleeps.
3291
3292         * utils.c (wtimer_granularity): Report correct values for
3293         Windows timers and for high-resolution timers.
3294
3295         * utils.c (wtimer_initialize_once): New function, called to
3296         initialize the timer frequency.
3297
3298         * utils.c: Replace the use of GetSystemTime with high-resolution
3299         counters under Windows.  When high-resolution counters are
3300         unavailable, use GetTickCount().
3301
3302 2005-03-15  Hrvoje Niksic  <hniksic@xemacs.org>
3303
3304         * retr.c (fd_read_body): Undo the 2004-11-18 change.  Instead,
3305         always be "exact".
3306
3307 2005-03-17  Hrvoje Niksic  <hniksic@xemacs.org>
3308
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
3311         the first place.
3312
3313 2005-03-15  Hrvoje Niksic  <hniksic@xemacs.org>
3314
3315         * http.c (read_http_response_head): Limit the response size to 64k
3316         bytes.
3317
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.
3321
3322 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3323
3324         * wget.h: Include options.h after wgint has been defined.
3325
3326         * options.h (struct options): Declare options processed with
3327         cmd_bytes as wgint, not long.
3328
3329 2005-03-18  Hrvoje Niksic  <hniksic@xemacs.org>
3330
3331         * init.c (cmd_file): Use concat_strings.
3332
3333         * http.c (basic_authentication_encode): Use concat_strings.
3334
3335         * ftp-ls.c (ftp_index): Use concat_strings.
3336
3337         * ftp-basic.c (ftp_request): Use concat_strings.
3338
3339         * utils.c (concat_strings): New function.
3340
3341 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3342
3343         * init.c (simple_atof): Handle negative numbers; skip whitespace
3344         before the number.
3345         (simple_atoi): Ditto.  Also, check for overflow and underflow.
3346         (cmd_number): Bail out on negative numbers.
3347         (parse_bytes_helper): Ditto.
3348
3349 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3350
3351         * http.c (gethttp): Handle multiple Set-Cookie headers sent by
3352         remote server.
3353
3354 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3355
3356         * init.c (defaults): Use passive FTP by default.
3357
3358 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3359
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.
3363
3364         * mswindows.h: Wrap calls to socket, bind, connect, recv, send,
3365         select, getsockname, getpeername, and setsockopt.
3366
3367 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3368
3369         * url.c (url_parse): Reject port numbers larger than 65535.  We
3370         also check for overflow while parsing port numbers.
3371
3372 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3373
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.
3376
3377         * options.h: Don't include stdio.h.
3378
3379         * log.c: Ditto.
3380
3381         * init.c: Disambiguate assignment from non-zero test to avoid
3382         Borland C warning.
3383
3384         * http.c (response_new): Don't needlessly post-increment count.
3385
3386         * hash.c: Include stdio.h.
3387
3388         * gnu-md5.h: Don't include stdio.h.
3389
3390         * getopt.h (struct option): Always use const.
3391
3392         * ftp.c (getftp): Avoid unnecessary assignment to RES to avoid
3393         Borland C warning.
3394
3395         * ftp-ls.c: Disambiguate assignment from non-zero test to avoid
3396         Borland C warning.
3397
3398         * cmpt.c (strptime_internal): Don't initialize rp_backup when
3399         !_NL_CURRENT to avoid Borland C warning.
3400
3401 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3402
3403         * utils.c (fopen_excl): Fix parse error when O_BINARY is
3404         available.
3405
3406 2005-03-05  Hrvoje Niksic  <hniksic@xemacs.org>
3407
3408         * url.c (url_file_name): Don't allow hosts named ".." to be
3409         appended as path elements.
3410
3411 2005-03-03  Hrvoje Niksic  <hniksic@xemacs.org>
3412
3413         * retr.c (retrieve_url): Escape location header.
3414
3415         * http.c (print_server_response_1): Escape server response when
3416         printing it.
3417         (gethttp): Escape host name, status message, location header, and
3418         content type.
3419         (http_loop): Escape error message from server.
3420
3421         * host.c (lookup_host): Escape host name when printing it.
3422
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.
3428
3429         * ftp-basic.c (ftp_response): Escape server response when printing
3430         it.
3431
3432         * cookies.c (parse_set_cookies): Escape the cookie field when
3433         printing it.
3434         (parse_set_cookies): Escape contents of remote header.
3435         (cookie_handle_set_cookie): Escape host name and cookie domain.
3436
3437         * connect.c (connect_to_ip): Escape the host name.
3438
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.
3442
3443 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3444
3445         * ftp.c (getftp): Ditto.
3446
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.
3449
3450         * log.c (redirect_output): Use unique_create to avoid a race
3451         condition.
3452
3453         * mswindows.c (fake_fork_child): Use unique_create.
3454
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
3461         wget -b.
3462
3463 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3464
3465         * host.c (lookup_host): Test for AI_ADDRCONFIG directly, instead
3466         of checking for HAVE_GETADDRINFO_AI_ADDRCONFIG.
3467
3468 2005-02-23  Hrvoje Niksic  <hniksic@xemacs.org>
3469
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.
3474
3475 2005-02-26  Gisle Vanem  <giva@bgnett.no>
3476
3477         * utils.c: Use the nnnLL syntax under GCC.  Define struct_stat to
3478         struct _stati64 under __MINGW32__ as well as under MS VC.
3479
3480 2005-02-26  Hrvoje Niksic  <hniksic@xemacs.org>
3481
3482         * utils.c: Use the nnnI64 syntax for __int64 constants under all
3483         Windows compilers.
3484         (SPRINTF_WGINT): Use "%I64" under all Windows compilers.
3485
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.
3490
3491         * mswindows.c: Define str_to_int64 under Borland C as well as
3492         under (older) Visual C.
3493
3494 2005-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
3495
3496         * ftp.c (getftp): Initialize err to suppress compiler warning.
3497
3498 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3499
3500         * ftp.c (ftp_expected_bytes): Fix bug that caused infloop because
3501         of not correctly skipping the '(' character.
3502
3503 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3504
3505         * mswindows.c (wget_ftello): Removed.
3506
3507         * mswindows.h: Remove bogus definition of stat.
3508         (wget_ftello): Remove the leftover ftello replacement.
3509
3510 2005-02-20  Hrvoje Niksic  <hniksic@xemacs.org>
3511
3512         * mswindows.c (wget_ftello): Wget's replacement for ftello.
3513
3514         * utils.c (file_size): Use ftello where available.
3515
3516         * ftp-ls.c (ftp_parse_unix_ls): Use str_to_wgint to parse the file
3517         size.
3518         (ftp_parse_winnt_ls): Ditto.
3519
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.
3522
3523         * ftp.c (ftp_expected_bytes): Use str_to_wgint to parse the file
3524         size.
3525
3526         * sysdep.h (LARGE_INT_FMT): Use __int64 as LARGE_INT on
3527         MSVC/Windows; print it with "%I64".
3528
3529         * wget.h: Define a `wgint' type, normally aliased to (the possibly
3530         64-bit variant of) off_t.
3531
3532         * all: Use `wgint' instead of `long' for numeric variables that
3533         can hold file sizes.
3534
3535         * utils.c (number_to_string): Support printing of `wgint'
3536         argument.
3537         (number_to_static_string): New function.
3538
3539         * all: Replace printf("%ld", long_value) with printf("%s",
3540         number_to_static_string(wgint_value)).
3541
3542 2005-02-18  Mauro Tortonesi <mauro@ferrara.linux.it>
3543
3544         * main.c: Added the --ftp-passwd command line option.
3545
3546         * init.c: Renamed command passwd to ftppasswd.
3547
3548 2005-02-11  Mauro Tortonesi <mauro@ferrara.linux.it>
3549         
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
3552         string.
3553         
3554 2005-02-10  Mauro Tortonesi <mauro@ferrara.linux.it>
3555
3556         * string.h: Renamed to string_t.h to fix a compilation conflict 
3557         with the string.h header in the standard C library.
3558         
3559         * string.c: Renamed to string_t.c for consistency with string.h.
3560         
3561         * string_t.c: Ditto.
3562
3563         * string_t.h: Ditto.
3564         
3565 2004-12-31  Mauro Tortonesi <mauro@ferrara.linux.it>
3566
3567         * string.c: New file.
3568
3569         * string.h: New file.
3570
3571         * Makefile.in: Added string.c to the list of modules to compile.
3572
3573         * main.c: Updated copyright.
3574
3575 2004-11-18  Ulf Harnhammar <ulf.harnhammar.9485@student.uu.se>
3576
3577         * ftp-ls.c: Fixed a problem in ftp_parse_winnt_ls that could allow a
3578         malicious remote FTP server to crash wget.
3579
3580 2004-11-18  Hans-Andreas Engel <engel@node.ch>
3581
3582         * http.c: Enable --convert-links (-k) when a single page is downloaded
3583         via --output-document (-O).
3584
3585 2004-11-18  Mauro Tortonesi <mauro@deepspace6.net>
3586
3587         * connect.c: Minor correction to the comment in front of fd_peek.
3588
3589 2004-11-18  Leonid Petrov <nouser@lpetrov.net>
3590
3591         * retr.c: Fix a timeout problem in fd_read_body when using http_proxy.
3592
3593 2004-11-15  YAMAZAKI Makoto <Yamazaki.Makoto@fujixerox.co.jp>
3594
3595         * netrc.c: Fix termination by assertion bug in netrc parsing.
3596
3597 2004-05-09  David Fritz  <zeroxdf@att.net>
3598
3599         * mswindows.c (fake_fork): Pass entire command line to the child
3600         process.
3601
3602 2004-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
3603
3604         * http.c (gethttp): Fix typo: SCHEME_SSL -> SCHEME_HTTPS.
3605
3606 2004-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
3607
3608         * http.c (gethttp): Send the Proxy-Authorization header over
3609         non-SSL connections too.
3610
3611 2004-03-25  David Fritz  <zeroxdf@att.net>
3612
3613         * mswindows.c (fake_fork_child): Ignore error code when
3614         OpenFileMapping() fails; assume it failed because the object does
3615         not exist.
3616
3617 2004-03-24  David Fritz  <zeroxdf@att.net>
3618
3619         * mswindows.c (fake_fork): New function.
3620
3621         * mswindows.c (fork_to_background): Use it.
3622
3623 2004-03-19  David Fritz  <zeroxdf@att.net>
3624
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.
3632
3633 2004-03-19  Hrvoje Niksic  <hniksic@xemacs.org>
3634
3635         * url.c (url_parse): Decode %HH sequences in host name.
3636
3637 2004-03-04  Hrvoje Niksic  <hniksic@xemacs.org>
3638
3639         * convert.c (local_quote_string): Quote "#" as "%23" and "%" as
3640         "%25" when creating links to local files.
3641
3642 2004-03-02  David Fritz  <zeroxdf@att.net>
3643
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.
3647
3648 2004-03-04  Gisle Vanem  <giva@bgnett.no>
3649
3650         * retr.c (fd_read_body): Don't change console title if quiet.
3651
3652 2004-02-25  David Fritz  <zeroxdf@att.net>
3653
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
3658         function-pointer.
3659         (ws_startup): Update call to set_sleep_mode().
3660         (ws_cleanup): Remove call to set_sleep_mode().
3661
3662 2004-02-23  David Fritz  <zeroxdf@att.net>
3663
3664         * http.c (http_loop): Ditto.
3665
3666         * ftp.c (ftp_loop_internal): Update call to ws_changetitle().
3667
3668         * main.c (main): Don't bother calling ws_changetitle().
3669
3670         * mswindows.h (ws_changetitle): Update prototype.
3671
3672         * mswindows.c (ws_changetitle): Remove second argument.  Use
3673         xfree_null().
3674         (ws_percenttitle): Only update title when percentage has changed.
3675
3676 2004-02-23  David Fritz  <zeroxdf@att.net>
3677
3678         * mswindows.h: Ditto.
3679
3680         * mswindows.c: Misc. formatting/comment tweaks throughout.
3681
3682 2004-02-20  David Fritz  <zeroxdf@att.net>
3683
3684         * main.c (print_help): Remove call to ws_help().
3685
3686         * mswindows.c (ws_help): Remove.
3687
3688         * mswindows.h (ws_help): Remove.
3689
3690 2004-02-16  David Fritz  <zeroxdf@att.net>
3691
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.
3697
3698         * mswindows.c (ws_mypath): Employ slightly more robust methodology.
3699         Strip trailing path separator.
3700
3701 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
3702
3703         * http.c (gethttp): Respect --ignore-length.
3704         (gethttp): Inhibit keep-alive if --ignore-length is specified.
3705
3706 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
3707
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.
3711
3712 2004-02-04  Hrvoje Niksic  <hniksic@xemacs.org>
3713
3714         * hash.c: Make the file compilable outside Wget source tree when
3715         -DSTANDALONE is used.
3716
3717 2004-01-29  Hrvoje Niksic  <hniksic@xemacs.org>
3718
3719         * utils.c (determine_screen_width): Return 0 if not running on
3720         Windows or on a TIOCGWINSZ-capable system.
3721
3722 2004-01-28  David Fritz  <zeroxdf@att.net>
3723
3724         * utils.c (determine_screen_width): Correctly determine console
3725         width under Windows.
3726
3727 2004-01-28  Christian Biere  <christianbiere@gmx.de>
3728
3729         * progress.c (bar_set_params): Fixed syntax error when HAVE_ISATTY
3730         was undefined.
3731
3732         * ftp.c (ftp_loop_internal): Allocate a larger buffer in case
3733         "try" gets translated to something large.  Ditto in http_loop in
3734         http.c.
3735
3736         * http.c (response_header_copy): Don't write to buf[BUFSIZE].
3737
3738         * ftp-opie.c (skey_response): Eliminate unnecessary string
3739         concatenation; just call gen_md5_update twice.
3740
3741 2004-01-25  Hrvoje Niksic  <hniksic@xemacs.org>
3742
3743         * utils.c (xsleep): Don't call usleep with values larger than
3744         1,000,000.
3745
3746 2003-12-16  Hrvoje Niksic  <hniksic@xemacs.org>
3747
3748         * http.c (gethttp): Fix generation of `Content-Length'.
3749
3750 2003-12-15  Gisle Vanem  <giva@bgnett.no>
3751
3752         * url.c (url_skip_credentials): Fixed return value; 'url' if no
3753         credentials.
3754
3755 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
3756
3757         * url.c (url_skip_credentials): Return a pointer directly.
3758
3759 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
3760
3761         * url.c (url_file_name): Ditto.
3762         (parse_errors): Ditto.
3763
3764         * retr.c (retr_rate): Ditto.
3765
3766         * progress.c (create_image): Ditto.
3767
3768         * netrc.c (parse_netrc): Ditto.
3769
3770         * main.c (struct cmdline_option): Ditto.
3771         (redirect_output_signal): Ditto.
3772
3773         * init.c (commands): Ditto.
3774
3775         * ftp-ls.c (ftp_index): Ditto.
3776
3777         * cookies.c (check_domain_match): Declare the pointer to a literal
3778         string as `const'.
3779
3780 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3781
3782         * retr.c (fd_read_body): Pass total size to progress_create, not
3783         the remaining amount.
3784
3785 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3786
3787         * retr.c (fd_read_body): Don't fiddle with "interactive timeout"
3788         if read timeout is unset.
3789
3790 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3791
3792         * connect.c (bind_local): Don't set the IPV6_V6ONLY option on the
3793         socket.
3794
3795 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
3796
3797         * url.c (url_file_name): Respect the setting of
3798         opt.protocol_directories.
3799
3800         * main.c (main): Only check for ret=='?' when longindex is unset.
3801         (option_data): New option --protocol-directories.
3802
3803 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
3804
3805         * ftp.c (getftp): Ditto.
3806
3807         * http.c (gethttp): Correctly calculate bandwidth as total data
3808         read divided with download time.
3809
3810         * retr.c (fd_read_body): Separate the return values for data
3811         written and read.
3812
3813 2003-12-05  Hrvoje Niksic  <hniksic@xemacs.org>
3814
3815         * http.c (H_REDIRECTED): Respect the HTTP/1.1 "303 See Other"
3816         response code.
3817         Suggested by Dan Razzell.
3818
3819 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3820
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.
3824
3825         * ftp.c (ftp_loop_internal): Ditto.
3826
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.
3830
3831         * ftp.c (getftp): Ditto for FTP "REST" command.
3832
3833         * http.c (gethttp): When the server doesn't respect range, skip
3834         the first RESTVAL bytes of the read body.  Never truncate the
3835         output file.
3836
3837         * retr.c (fd_read_body): Support skipping initial STARTPOS octets.
3838
3839 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3840
3841         * http.c (skip_short_body): Renamed skip_body to skip_short_body;
3842         don't bother calling fd_read_body.
3843
3844 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3845
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.
3849
3850 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3851