]> sjero.net Git - wget/blob - src/ChangeLog
Fix some other problems with GNU TLS and non blocking sockets.
[wget] / src / ChangeLog
1 2011-08-30  Giuseppe Scrivano  <gscrivano@gnu.org>
2
3         * gnutls.c (wgnutls_read_timeout): Use the non blocking socket only for
4         `gnutls_record_recv'.  Set errno to ETIMEDOUT on a read timeout.
5
6 2011-08-29  Giuseppe Scrivano  <gscrivano@gnu.org>
7
8         * gnutls.c (wgnutls_read_timeout): New function.
9         (wgnutls_read): Use wgnutls_read_timeout.
10         (wgnutls_peek): Likewise.
11
12 2011-08-27  Giuseppe Scrivano  <gscrivano@gnu.org>
13
14         * main.c (print_help): Exit with an error status if print to stdout
15         fails.
16         (print_usage): Change method signature and return a status code.
17         (print_version): Likewise.
18
19 2011-08-26  Giuseppe Scrivano  <gscrivano@gnu.org>
20
21         * gnutls.c: Include "ptimer.h".
22         (wgnutls_read): Honor read timeout.
23
24         * openssl.c (ssl_init): Make `meth' const.
25
26 2011-08-25  Giuseppe Scrivano  <gscrivano@gnu.org>
27
28         * utils.c [HAVE_UTIME && HAVE_UTIME_H]: Include <utime.h>.
29         [HAVE_UTIME && HAVE_SYS_UTIME_H]: Include <sys/utime.h>.
30         (touch) [HAVE_UTIME: Prefers utime over futimens when it is available.
31         It was reported that Cygwin has a not working futimens.
32
33 2011-08-19  Giuseppe Scrivano  <gscrivano@gnu.org>
34
35         * init.c (home_dir) [MSDOS]: Move local variable `len' here.
36
37 2011-08-18  Giuseppe Scrivano  <giuseppe@southpole.se>
38
39         * http.c (gethttp): Fix a memory leak on some errors.  Free the head
40         buffer.
41
42         * Makefile.am: Use an additional file "css_.c" which in turn includes
43         "wget.h" and immediately "css.c".
44
45         * http.c (gethttp): Reset chunked_transfer_encoding on redirections.
46
47 2011-08-13  Giuseppe Scrivano  <gscrivano@gnu.org>
48
49         * retr.c (fd_read_body): Ensure max is not already defined.
50
51         * mswindows.h (snprintf): Remove definition.
52         (vsnprintf): Likewise.
53
54 2011-08-12  Giuseppe Scrivano  <gscrivano@gnu.org>
55
56         * css.l: Remove include "wget.h".
57         Reported by: Perry Smith <pedzsan@gmail.com>.
58
59 2011-08-11  Giuseppe Scrivano  <gscrivano@gnu.org>
60
61         * utils.c (abort_run_with_timeout): Use sigprocmask instead of
62         sigsetmask.
63
64         * gnutls.c (ssl_connect_wget): Remove call to deprecated function
65         `gnutls_certificate_type_set_priority'.
66
67         * Makefile.am (version.c): Don't invoke hg to set version string.
68
69 2011-08-10  Giuseppe Scrivano  <gscrivano@gnu.org>
70
71         Fix a linker error on systems with an older gnutls version.
72         * gnutls.c (ssl_connect_wget)
73         [HAVE_GNUTLS_PRIORITY_SET_DIRECT]:  Use gnutls_priority_set_direct.
74         [! HAVE_GNUTLS_PRIORITY_SET_DIRECT]:  Use gnutls_protocol_set_priority.
75         Reported by: Karl Berry <karl@freefriends.org>
76
77 2011-08-06  Jochen Roderburg <Roderburg@Uni-Koeln.DE>
78
79         * host.c (lookup_host): Ensure it doesn't print more IPs than available
80         ones.
81
82 2011-08-06  Giuseppe Scrivano  <gscrivano@gnu.org>
83
84         * init.c (defaults): Set default value for show_all_dns_entries.
85
86         * host.c (lookup_host): If `showalldnsentries' is used then print all
87         the IP corresponding to a DNS entry.
88         * init.c (commands): Add `showalldnsentries'.
89         Suggested by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
90
91         * http.c (gethttp): Add the Cache-Control HTTP header when --no-cache
92         is specified.
93         Reported by: Коренберг Марк <socketpair@gmail.com>.
94
95 2011-08-05  Giuseppe Scrivano  <gscrivano@gnu.org>
96
97         * utils.c (acceptable): Accept always the file if it is the specified
98         output destination.
99         Reported by: Shai Berger <shai@platonix.com>
100
101 2011-08-05  Giuseppe Scrivano  <giuseppe@southpole.se>
102
103         * gnutls.c (ssl_connect_wget): Use `gnutls_priority_set_direct' instead
104         of the deprecated `gnutls_protocol_set_priority'.
105
106 2011-08-02  Giuseppe Scrivano  <giuseppe@southpole.se>
107
108         * cookies.c (parse_set_cookie): If the value is quoted, do not modify
109         it.
110         Reported by: Nirgal Vourgère <jmv_deb@nirgal.com>
111
112 2011-07-29  Giuseppe Scrivano  <giuseppe@southpole.se>
113
114         * log.c (logprintf): Exit immediately on a SIGPIPE error.
115         Reported by: Noèl Köthe  <noel@debian.org>.
116
117 2011-07-26  Carlos Martín Nieto  <carlos@cmartin.tk>  (tiny change)
118
119         * init.c (home_dir): Allocate path buffer dinamically.
120
121 2011-07-26  Giuseppe Scrivano  <giuseppe@southpole.se>
122
123         * retr.c (retrieve_url): Do not register redirects when in spider mode.
124
125 2011-07-20 Merinov Nikolay <kim.roader@gmail.com>
126
127         * iri.c (remote_to_utf8): Add test for non-ASCII symbols with
128         UTF-8 URI encoding.
129         * res.c (res_retrieve_file): Fix url_parse call.
130
131 2011-06-08  Giuseppe Scrivano  <giuseppe@southpole.se>
132
133         * retr.c (retrieve_from_file): Parse the url careless if IRI is enabled.
134         Reported by: Volker Kuhlmann <list0570@paradise.net.nz>.
135
136 2011-05-24  Giuseppe Scrivano  <gscrivano@gnu.org>
137
138         * retr.c (fd_read_body): Define max.
139
140 2010-12-28  Adrien Nader  <adrien@notk.org> (tiny change)
141
142         * main.c [WINDOWS]: Include <io.h> and <fcntl.h>.
143         (main) [WINDOWS]: Set the stdout file mode to binary.
144         Submitted also by: Martin Panter <vadmium@gmail.com>
145
146 2011-05-23  Giuseppe Scrivano  <gscrivano@gnu.org>
147
148         * retr.c (fd_read_body): Be sure the buffer size is at least 8Kb.
149         BUFSIZ may assume very small values with a negative impact on the
150         performances.
151
152         * mswindows.h [NEED_GAI_STRERROR]: remove definition for gai_strerror.
153
154 2011-05-15  Ray Satiro <raysatiro@yahoo.com>
155
156         * connect.c (select_fd) [WINDOWS]: Ensure the socket is blocking.
157         * mswindows.h: Add declaration for set_windows_fd_as_blocking_socket.
158         * mswindows.c (set_windows_fd_as_blocking_socket): New function.
159
160         * openssl.c (openssl_read): Prevent loops on read errors.
161
162 2011-04-24  Giuseppe Scrivano  <gscrivano@gnu.org>
163
164         * html-url.c: Include "exists.h".
165         * gnutls.c (wgnutls_peek): Remove local variable `ret'.
166
167 2011-04-21  Daniel Manrique <roadmr@tomechangosubanana.com> (tiny change)
168         * main.c (main): Set exit status when invalid host name given in
169         command line.
170         * html-url.c (get_urls_file): Set exit status when invalid host
171         name given in input file.
172
173 2011-04-19  Giuseppe Scrivano  <gscrivano@gnu.org>
174
175         * gnutls.c: Do not include <fcntl.h>.
176         * gnutls.c (wgnutls_peek): Ensure there is data available before attempt
177         a read on the blocking socket.
178
179         * Makefile.am (LIBS): Add $(LIB_CLOCK_GETTIME)
180         * utils.c: Include <sys/stat.h>.  Do not include <sys/time.h>.
181         (touch): Use `futimens' instead of `utimes'.
182
183         * mswindows.h: Do not include <direct.h>.  Remove macro definition for
184         mkdir.
185
186 2011-04-18  Giuseppe Scrivano  <gscrivano@gnu.org>
187
188         * utils.c: Include <sys/time.h>.  Do not include <sys/utime.h>.
189         (touch): Use `utimes' instead of `utime'.
190
191         * openssl.c (openssl_read): Fix build error.
192
193 2011-04-17  Giuseppe Scrivano  <gscrivano@gnu.org>
194
195         * wget.h [HAVE_LIBSSL32]: Define HAVE_SSL.
196
197         * gnutls.c (wgnutls_peek): Use correctly FIONBIO codes under Mingw32.
198         Reported by: Ray Satiro <raysatiro@yahoo.com>
199
200 2011-04-13  Giuseppe Scrivano  <gscrivano@gnu.org>
201
202         * openssl.c (openssl_poll): Check if the specified timeout is zero after
203         SSL_pending.
204         (openssl_peek): Make the call non-blocking.
205
206 2011-04-11  Cristian Rodríguez  <crrodriguez@opensuse.org> (tiny change)
207
208         * openssl.c (ssl_init) [! OPENSSL_NO_SSL2]: Use SSLv2 only when
209         available.
210
211 2011-04-07  Giuseppe Scrivano  <gscrivano@gnu.org>
212
213         * gnutls.c (ssl_init): Allow X509 v1 certificates.
214         Suggested by: Ray Satiro <raysatiro@yahoo.com>
215
216         (wgnutls_peek): Remove tight loop around gnutls_record_recv.
217
218 2011-04-07  Ray Satiro  <raysatiro@yahoo.com> (tiny change)
219
220         (wgnutls_read): Check for the GNUTLS_E_AGAIN return code in the recv
221         tight loop.
222         (wgnutls_write): Likewise.
223         (wgnutls_peek): Likewise.
224
225 2011-04-07  Giuseppe Scrivano  <gscrivano@gnu.org>
226
227         * gnutls.c (wgnutls_peek): New local variable `read'.
228         Use `read' instead of `ret' to store the number of read bytes.
229         Reported by: Ray Satiro <raysatiro@yahoo.com>
230
231 2011-04-04  Giuseppe Scrivano  <gscrivano@gnu.org>
232
233         * openssl.c [WINDOWS]: Include <w32sock.h>.
234         (openssl_read): Retry the read on SSL_ERROR_WANT_READ.
235
236         * host.c [WINDOWS]: Include <winsock2.h> and <ws2tcpip.h>.
237         Suggested by: Ray Satiro <raysatiro@yahoo.com>.
238
239         * Makefile.am (LIBS): Remove  @LIBSSL@ @W32LIBS@
240
241 2011-04-03  Giuseppe Scrivano  <gscrivano@gnu.org>
242
243         * gnutls.c: Include <fcntl.h>.
244         (wgnutls_peek): Make the socket non blocking before attempt a read.
245
246         * gnutls.c: Include <sys/ioctl.h>.
247         (wgnutls_peek) [F_GETFL]: Use fcntl.
248         (wgnutls_peek) [! F_GETFL]: Use ioctl.
249
250
251 2011-03-31  Giuseppe Scrivano  <gscrivano@gnu.org>
252
253         * recur.c (download_child_p): When --no-parent is used, check that the
254         ports are the same only in case the same protocol is used.
255         Reported by: Karl Berry <karl@freefriends.org>
256
257         * res.c (res_parse): Add new line to debug messages.
258
259 2011-03-21  Giuseppe Scrivano  <gscrivano@gnu.org>
260
261         * iri.h (parse_charset) [!ENABLE_IRI]: Use the parameter to avoid a
262         compiler warning.
263
264         * iri.h: Declare `dummy_iri' as extern not static.
265         * main.c [!ENABLE_IRI]: Define `dummy_iri'.
266         (main) [!ENABLE_IRI]: Initialize `dummy_iri'.
267
268 2011-03-11  Giuseppe Scrivano  <gscrivano@gnu.org>
269
270         * ftp.c (getftp): Fix some memory leaks.
271         * ftp-ls.c (ftp_parse_winnt_ls): Likewise.
272         Reported by: Zhenbo Xu <zhenbo1987@gmail.com>.
273
274 2010-11-20  Filipe Brandenburger <filbranden@gmail.com> (tiny change)
275
276         * http.c (gethttp): Repeat a POST request on a 307 response.
277         * retr.c (retrieve_url): Use NEWLOCATION_KEEP_POST.
278         * wget.h: Define NEWLOCATION_KEEP_POST.
279
280 2011-03-02  Tomasz Buchert <tomek.buchert@gmail.com> (tiny change)
281
282         * http.c (ensure_extension): Do not adjust the extension if the file
283         ends in .htm.
284
285 2011-02-22  Gilles Carry  <gilles.carry@st.com>
286
287         * main.c (prompt_for_password): Use stderr instead of stdout
288         to prompt password. This allows to use --output-document=- and
289         --ask-password simultaneously. Without this, redirecting stdout
290         makes password prompt invisible and mucks up payload such as in
291         this example:
292         wget --output-document=- --ask-password -user=foo \
293                 http://foo.com/tarball.tgz | tar zxf -
294
295 2011-02-22  Steven Schubiger  <stsc@member.fsf.org>
296
297         * http.c (gethttp, http_loop): Move duplicated code which is run
298         when an existing file is not to be clobbered to a function.
299         (get_file_flags): New static function.
300
301 2010-12-10  Evgeniy Philippov <egphilippov@googlemail.com> (tiny change)
302
303         * main.c (main): Initialize `total_downloaded_bytes'.
304
305 2010-12-09  Giuseppe Scrivano  <gscrivano@gnu.org>
306
307         * main.c (main): If --no-clobber and --convert-links are used at the
308         same time, use only the latter.
309         Reported by: Romain Vimont <rom@rom1v.com>
310
311 2010-12-07  Jessica McKellar <jesstess@mit.edu> (tiny change)
312
313         * main.c: Make help message clearer.
314
315 2010-12-02  Giuseppe Scrivano  <gscrivano@gnu.org>
316
317         * build_info.c.in: Do not list md5.
318
319 2010-12-01  Giuseppe Scrivano  <gscrivano@gnu.org>
320
321         * cmpt.c: Include <unistd.h> inconditionally.
322         * connect.c: Likewise.
323         * convert.c: Likewise.
324         * ftp-basic.c: Likewise.
325         * ftp-ls.c: Likewise.
326         * ftp.c: Likewise.
327         * gnutls.c: Likewise.
328         * http.c: Likewise.
329         * init.c: Likewise.
330         * log.c: Likewise.
331         * main.c: Likewise.
332         * openssl.c: Likewise.
333         * progress.c: Likewise.
334         * ptimer.c: Likewise.
335         * recur.c: Likewise.
336         * retr.c: Likewise.
337         * url.c: Likewise.
338         * utils.c: Likewise.
339
340         * retr.c (fd_read_body): Dinamically allocate `dlbuf'.
341
342 2010-11-27  Reza Snowdon  <vivi@mage.me.uk>
343
344         * init.c (initialize): If 'ok' is not zero; exit, as this
345         indicates there was a problem parsing 'SYSTEM_WGETRC'.
346         Fixes bug #20370.
347
348 2010-11-22  Giuseppe Scrivano  <gscrivano@gnu.org>
349
350         Revert last commit.
351         * ftp.c (getftp): When count > 0, don't append to the existing file.
352         * http.c (gethttp): Likewise.
353
354 2010-11-21  Giuseppe Scrivano  <gscrivano@gnu.org>
355
356         * ftp.c (getftp): If `count' is bigger than zero, try to resume the
357         download, not restart it.
358         * http.c (gethttp): Likewise.
359         Suggested by: Evgeny Kapun <abacabadabacaba@gmail.com>.
360
361 2010-11-19  Giuseppe Scrivano  <gscrivano@gnu.org>
362
363         * ftp.c (getftp): Accept new argument `count'.  When `count' is
364         bigger than zero, assume the file can be overwritten.
365         (ftp_loop_internal): Pass new argument `count' to `getftp'.
366
367         * http.c (gethttp): Accept new argument `count'.  When `count' is
368         bigger than zero, assume the file can be overwritten.
369         (http_loop): Pass new argument `count' to `gethttp'.
370         Reported by: Evgeny Kapun <abacabadabacaba@gmail.com>.
371
372 2010-08-08  Reza Snowdon <vivi@mage.me.uk>
373
374         * main.c (main): inserted 'defaults'.
375           Added additional 'getopt_long' while loop to search and apply a
376           user specified config file before any other options.
377           New variables 'retconf', 'use_userconfig',
378           'confval', 'userrc_ret', 'config_opt'.
379         * init.c: Include stdbool.h.
380           (commands): Added config details.
381           (defaults): Removed static.
382           (wgetrc): Removed static.
383           (initialize): Removed 'defaults ()',
384           changed 'int ok' to 'bool ok'.
385         * options.h: New variable 'choose_config'.
386         * init.h (defaults): exported function.
387           (run_wgetrc): exported function.
388
389 2010-10-24  Jessica McKellar <jesstess@mit.edu> (tiny change)
390
391         * main.c (main): Print the total download time as part of the
392         summary for downloads using the recursive or page requisites
393         options. Fixes bug #21359.
394
395 2010-10-24  Giuseppe Scrivano  <gscrivano@gnu.org>
396
397         * gnutls.c (wgnutls_peek): Do not return an error when
398         `gnutls_record_recv' fails but some data is already available.
399
400 2010-10-23  Giuseppe Scrivano  <gscrivano@gnu.org>
401
402         * Makefile.am (LIBS): Remove @LIBGNUTLS@ and use @W32LIBS@ as last
403         component.
404
405         * gnutls.c (wgnutls_peek): Block until data is available.
406
407 2010-10-21  Giuseppe Scrivano  <gscrivano@gnu.org>
408
409         * retr.c (retrieve_url): Do not register HTML files twice.
410         Reported by: Manfred Koizar <mkoi-pg@aon.at>.
411
412 2010-10-18  Manfred Koizar <mkoi-pg@aon.at> (tiny change)
413
414         * html-url.c (tag_handle_link): Do not assume external links type
415         to be always "text/html".
416
417 2010-10-16  Giuseppe Scrivano  <gscrivano@gnu.org>
418
419         * connect.c (socket_ip_address): Initialize `sockaddr' to zero.
420         * ftp-basic.c (ftp_epsv): Remove dead assignment to `s'.
421         * ftp-ls.c (ftp_parse_vms_ls): Remove dead assignment to `len'.
422         * http.c (skip_short_body): Remove dead assignment to `ret'.
423         * init.c (wgetrc_user_file_name): Remove dead assignment to `home'.
424         * main.c (main): Silent warning reported by clang.
425         (http_loop): Silent warning reported by clang.
426         * retr.c (retrieve_url): Likewise.
427         * url.c (init_seps): Remove dead assignment to `p'.
428
429 2010-10-11  Giuseppe Scrivano  <gscrivano@gnu.org>
430
431         * ftp.c (getftp): Fix indentation.
432
433 2010-10-11  Steven Schubiger <stsc@member.fsf.org>
434
435         * ftp.c (getftp): Initialize `targ'.
436
437 2010-10-08  Ivanov Anton <x86mail@gmail.com> (tiny change)
438
439     * src/html-url.c (check_style_attr): Skip quotes when they are present.
440
441 2010-10-06  Giuseppe Scrivano  <gscrivano@gnu.org>
442
443         * main.c (main): Remove unused variable `status'.
444
445 2010-09-25  Merinov Nikolay  <kim.roader@gmail.com>
446
447         * init.c: Add "unlink" command into command list.
448         * main.c: Add "unlink" option into option_data list.
449         * options.h: Adding unlink field into struct options.
450         * wget.h: Addind UNLINKERR error into uerr_t enum.
451         * exits.c (get_status_for_err): define status for UNLINKERR.
452         * ftp.c (getftp): unlink file if exists, instead clobbering.
453         (ftp_loop_internal): processing UNLINKERR.
454         * http.c (gethttp): unlink file if exists, instead clobbering.
455         (http_loop): processing UNLINKERR.
456
457 2010-09-24  Dennis, CHENG Renquan <crquan@fedoraproject.org>
458
459         Fix problem when content-disposition is used with recursive downloading.
460         * url.h (url_file_name): Add a new argument `replaced_filename'.
461         * url.c (url_file_name): Likewise.
462         * http.c (parse_content_disposition): Do not add a prefix to the return
463         value.
464         (test_parse_content_disposition): Adjust tests.
465         (gethttp): Pass additional parameter to `url_file_name'.
466         (http_loop): Likewise.
467         * ftp.c (ftp_loop_internal, ftp_get_listing, ftp_retrieve_list)
468         (ftp_loop): Likewise.
469
470 2010-09-14  Giuseppe Scrivano  <gscrivano@gnu.org>
471
472         * convert.c (local_quote_string): Accept new parameter `no_html_quote'.
473         Inhibit HTML quoting when `no_html_quote'.
474         (convert_links): Disable HTML quoting in CSS files.
475         Reported by: Manuel Reinhardt <reinhardt@syslab.com>.
476
477 2010-09-12  Giuseppe Scrivano  <gscrivano@gnu.org>
478
479         * main.c (print_help): Align --trust-server-names help text with
480         the rest of the text.
481         Suggested by: Mike Frysinger  <vapier@gentoo.org>.
482
483 2010-08-20  Giuseppe Scrivano  <gscrivano@gnu.org>
484
485         * convert.c: Include "iri.h".
486         (convert_links_in_hashtable): Parse the url, if
487         necessary, before check if it is present in the dowloaded url
488         map.
489         Reported by: <sk.random@gmail.com>.
490
491 2010-08-09  Giuseppe Scrivano  <gscrivano@gnu.org>
492
493         Fix a problem with HTTP/1.0 proxies.
494         * http.c (gethttp): Specify the connection header when keep alive
495         connections are not used.
496
497         Use persistent connections with proxies supporting them.
498         * http.c (gethttp): Specify Proxy-Connection to the HTTP proxy.
499
500 2010-08-06  Giuseppe Scrivano  <gscrivano@gnu.org>
501
502         * css-url.c (get_uri_string): Skip empty urls.
503
504 2010-07-25  John Trengrove  <jtrengrove@gmail.com> (tiny change)
505
506         * ftp.h: Added enum `parsetype'.  Modified struct to hold parsetype.
507
508         * ftp-ls.c (ftp_parse_unix_ls): Default to TT_DAY. Change to TT_HOUR_MIN
509         if hours/minutes parsed.
510         (ftp_parse_winnt_ls): Default to TT_HOUR_MIN.
511         (ftp_parse_vms_ls): Default to TT_HOUR_MIN.
512         (ftp_index): Print only if fileinfo struct value ttype set to TT_HOUR_MIN.
513
514 2010-07-30  Giuseppe Scrivano  <gscrivano@gnu.org>
515
516         * html-url.h (struct map_context): Remove member `tail'.
517
518         * html-url.c (append_url): Append the new url ordered by `position'.
519         (get_urls_html): Do not initialize `ctx.tail'.
520
521         * css-url.c (get_urls_css_file): Do not initialize `ctx.tail'.
522
523 2010-07-29  Giuseppe Scrivano  <gscrivano@gnu.org>
524
525         * gnutls.c (wgnutls_peek): Don't read more data if the buffered peek
526         data is sufficient.
527
528 2010-07-28  Giuseppe Scrivano  <gscrivano@gnu.org>
529
530         * http.h (http_loop): Add new argument `original_url'
531         * http.c (http_loop): Add new argument `original_url'.  Use
532         `original_url' to get a filename if `trustservernames' is false.
533
534         * init.c (commands): Add "trustservernames".
535
536         * options.h (library): Add variable `trustservernames'.
537
538         * main.c (option_data): Add trust-server-names.
539         (print_help): Describe --trust-server-names.
540
541         * retr.c (retrieve_url): Pass new argument to `http_loop'.
542
543 2010-07-20  Alan Jenkins <alan-jenkins@tuffmail.co.uk> (tiny change)
544
545         * http.c (gethttp): Check content-length was set before trying to
546         compare it with the already downloded filesize.
547
548 2010-07-20  Leonid Petrov <nouser@lpetrov.net>
549
550         * ftp.c (getftp): Don't attempt to retrieve the file if it is already
551         completely.
552         (ftp_loop_internal): Force the length to be zero for symlinks.
553
554 2010-07-18  Giuseppe Scrivano  <gscrivano@gnu.org>
555
556         * http.c (gethttp): If -N is used, don't exit immediately if the content
557         length is less or equal than the existing file size.  Specify "Range"
558         only if -N is not used.
559         Reported by: Caleb Cushing <xenoterracide@gmail.com>.
560
561 2010-07-14  Giuseppe Scrivano  <gscrivano@gnu.org>
562
563         * ftp.c (max): Remove definition.
564         (getftp): New variable `got_expected_bytes'.  Let `expected_bytes' be
565         the value SIZE returns, otherwise use the bytes count returned by RETR.
566         Suggested by Daniel Stenberg <daniel@haxx.se>.
567
568 2010-07-14  Giuseppe Scrivano  <gscrivano@gnu.org>
569
570         * ftp.c (max): Add definition.
571         (getftp): Consider for `expected_bytes' the greatest value between the
572         bytes count returned by SIZE and the bytes count returned by RETR.
573         Reported by: Jozua <jozua@sparky.za.net>.
574
575 2010-07-11  Giuseppe Scrivano  <gscrivano@gnu.org>
576
577         * http.c (http_loop): New variable `force_full_retrieve'.  If the remote
578         file is newer that the local one then inhibit -c.
579         Reported by: Caleb Cushing <xenoterracide@gmail.com>.
580
581 2010-07-09  Giuseppe Scrivano  <gscrivano@gnu.org>
582
583         * css-url.c (get_urls_css_file): Use `wget_read_file' instead of
584         `read_file'.  Use `wget_read_file_free' instead of `read_file_free'.
585         * convert.c (convert_links): Likewise.
586         * html-url.c (get_urls_html, get_urls_file): Likewise.
587         * res.c (res_parse_from_file): Likewise.
588
589         * utils.h: Rename `read_file' to `wget_read_file'.  Rename
590         `read_file_free' to `wget_read_file_free'.
591
592         * utils.c (wget_read_file): Renamed from `read_file'.
593         (wget_read_file_free): Renamed from `read_file_free'.
594
595 2010-07-05  Giuseppe Scrivano  <gscrivano@gnu.org>
596
597         * gnutls.c (ssl_init): New local variables `ca_directory' and `dir'.
598         Load default root certificates under the `ca_directory' directory.
599
600 2010-07-03  Giuseppe Scrivano  <gscrivano@gnu.org>
601
602         * gnutls.c (ssl_connect_wget): New local variable `allowed_protocols'.
603         Honor the --secure-protocol flag.
604
605 2010-06-20  Giuseppe Scrivano  <gscrivano@gnu.org>
606
607         * main.c (print_help): Fix help string for --random-wait.  Its range is
608         [0.5*wait, 1.5*wait) not [0, 2*wait).
609         Reported by: Tom Mizutani <gombei1970@gmail.com>.
610
611 2010-06-15  Giuseppe Scrivano  <gscrivano@gnu.org>
612
613         * gnutls.c [WIN32]: Include "w32sock.h".
614         (FD_TO_SOCKET): Add definition.
615         (ssl_connect_wget): Get the real socket handle by FD_TO_SOCKET.
616         Define FD_TO_SOCKET if it is not yet defined.
617
618 2010-06-14  Giuseppe Scrivano  <gscrivano@gnu.org>
619
620         * gnutls.c: Include <stdlib.h>.
621         (struct wgnutls_transport_context): Remove `peekstart'.
622         (ssl_connect_wget): Renamed from `ssl_connect'.
623         (wgnutls_poll): New variable `ctx'.
624         (wgnutls_read): Don't use `ctx->peekstart'.
625         (wgnutls_peek): Likewise.  Don't attempt to read if there is not
626         ready data.
627
628 2010-06-14  Giuseppe Scrivano  <gscrivano@gnu.org>
629         * http.c (http_loop): Always send a HEAD request when -N is used
630         together with --content-disposition.
631         Reported by: Jochen Roderburg <Roderburg@Uni-Koeln.DE>.
632
633 2010-06-10  Muthu Subramanian K <muthusuba@gmail.com> (tiny change)
634
635         * http.c (http_loop): Increase `total_downloaded_bytes' by
636         `hstat.rd_size', not `hstat.len'.
637
638 2010-06-10  Giuseppe Scrivano  <gscrivano@gnu.org>
639
640         * main.c (print_version): Drop the current maintainer line.
641
642 2010-06-10  Giuseppe Scrivano  <gscrivano@gnu.org>
643
644         * Makefile.am (build_info.c): Generate the `build_info.c' file under
645         the build directory.
646         Patch by: Daniel Stenberg <daniel@haxx.se>.
647
648 2010-06-03  Giuseppe Scrivano  <gscrivano@gnu.org>
649
650         * http.c (http_loop): Do not send a HEAD request before the GET request
651         when --content-disposition is used.
652         Reported by: alex_wh@mail.ru.
653
654 2010-05-31  Giuseppe Scrivano  <gscrivano@gnu.org>
655
656         * css.l: Use option "nounput".
657         (YY_NO_INPUT): Add macro definition.
658
659 2010-05-31  Giuseppe Scrivano  <gscrivano@gnu.org>
660
661         * html-parse.c (map_html_tags): Fix condition for closed tag.  Handle
662         the case '>' is not specified after '/'.
663
664 2010-05-31  Giuseppe Scrivano  <gscrivano@gnu.org>
665
666         * sysdep.h (_SVID_SOURCE): Remove definition.
667         (_BSD_SOURCE): Remove definition.
668
669 2010-05-31  Giuseppe Scrivano  <gscrivano@gnu.org>
670
671         * recur.c (retrieve_tree): Remove variable `up_error_code'.
672
673         * iri.c (open_locale_to_utf8): Remove function.
674
675 2010-05-30  Giuseppe Scrivano  <gscrivano@gnu.org>
676
677         * html-parse.c (NAME_CHAR_P): Consider '<' an invalid character.
678         (advance_declaration): Close the tag if '<' is found.
679         (map_html_tags): Likewise.
680
681 2010-05-27  Giuseppe Scrivano  <gscrivano@gnu.org>
682
683         * main.c (print_usage): Accept a new parameter `error'.
684         (main): Print diagnostic messages to stderr, not stdout.
685
686 2010-05-27  Giuseppe Scrivano  <gscrivano@gnu.org>
687
688         * Makefile.am (wget_SOURCES): Remove `snprintf.c'.
689
690         * snprintf.c: Remove file.
691
692 2010-05-27  Giuseppe Scrivano  <gscrivano@gnu.org>
693
694         * main.c (main): Exit with failure when -k is specified and -O is not
695         a regular file.
696
697 2010-05-27  Giuseppe Scrivano  <gscrivano@gnu.org>
698
699         * http.c (gethttp): Consider new cookies retrieved when the
700         authorization fails.
701
702 2010-05-25  Giuseppe Scrivano  <gscrivano@gnu.org>
703
704         * host.c (sufmatch): Do not consider zero length entries.
705
706         * http.c (H_10X): New macro.
707         (gethttp): Silently ignore 1xx responses.
708
709 2010-05-24  Giuseppe Scrivano  <gscrivano@gnu.org>
710
711         * iri.h (dummy_iri): Define static.
712
713         * css-tokens.h (css_tokens): Remove variable.
714
715 2010-05-23  Giuseppe Scrivano  <gscrivano@gnu.org>
716
717         * http.c (http_atotm): Count the NUL character when copying the locale
718         string.
719         Reported by: Florian Weimer <fw@deneb.enyo.de>
720
721 2010-05-16  Giuseppe Scrivano  <gscrivano@gnu.org>
722
723         * Makefile.am (LDADD): Remove MD5_LDADD.
724         (MD5_LDADD): Remove definition.
725         (AM_CPPFLAGS): Remove MD5_CPPFLAGS.
726         (version.c): Remove dependency from MD5_LDADD.
727         (../md5/libmd5.a): Remove rule.
728
729         * ftp-opie.c: Include "md5.h".  Do not include "gen-md5.h".
730         (skey_response): New variable ctx.  Use md5 functions from the gnulib
731         module instead of functions defined previously in the "gen-md5.h" file.
732
733         * gen-md5.h: Remove file.
734         * gen-md5.c: Likewise.
735
736         * http.c: Include "md5.h".  Do not include "gen-md5.h".
737         (digest_authentication_encode): New variable ctx.  Use md5 functions
738         from the gnulib module instead of functions defined previously in the
739         "gen-md5.h" file.
740
741 2010-05-15  Giuseppe Scrivano  <gscrivano@gnu.org>
742
743         * Makefile.am: Quote any path using $(top_srcdir) or $(top_builddir).
744         (version.c): Remove dependency from configure.ac and Makefile.am.
745
746         * css.l: Include "wget.h".
747
748 2010-05-08  Giuseppe Scrivano  <gscrivano@gnu.org>
749
750         * Makefile.am: Update copyright years.
751         * cmpt.c: Likewise.
752         * connect.h: Likewise.
753         * convert.c: Likewise.
754         * convert.h: Likewise.
755         * cookies.c: Likewise.
756         * cookies.h: Likewise.
757         * css-tokens.h: Likewise.
758         * css-url.c: Likewise.
759         * css-url.h: Likewise.
760         * css.l: Likewise.
761         * exits.c: Likewise.
762         * exits.h: Likewise.
763         * ftp-basic.c: Likewise.
764         * ftp-ls.c: Likewise.
765         * ftp-opie.c: Likewise.
766         * ftp.c: Likewise.
767         * ftp.h: Likewise.
768         * gen-md5.c: Likewise.
769         * gen-md5.h: Likewise.
770         * gettext.h: Likewise.
771         * gnutls.c: Likewise.
772         * hash.c: Likewise.
773         * hash.h: Likewise.
774         * host.c: Likewise.
775         * host.h: Likewise.
776         * html-parse.c: Likewise.
777         * html-parse.h: Likewise.
778         * html-url.c: Likewise.
779         * html-url.h: Likewise.
780         * http-ntlm.c: Likewise.
781         * http-ntlm.h: Likewise.
782         * http.c: Likewise.
783         * http.h: Likewise.
784         * init.c: Likewise.
785         * init.h: Likewise.
786         * iri.c: Likewise.
787         * iri.h: Likewise.
788         * log.c: Likewise.
789         * log.h: Likewise.
790         * main.c: Likewise.
791         * mswindows.c: Likewise.
792         * mswindows.h: Likewise.
793         * netrc.c: Likewise.
794         * netrc.h: Likewise.
795         * openssl.c: Likewise.
796         * options.h: Likewise.
797         * progress.c: Likewise.
798         * progress.h: Likewise.
799         * ptimer.c: Likewise.
800         * ptimer.h: Likewise.
801         * recur.c: Likewise.
802         * recur.h: Likewise.
803         * res.c: Likewise.
804         * res.h: Likewise.
805         * retr.c: Likewise.
806         * retr.h: Likewise.
807         * spider.c: Likewise.
808         * spider.h: Likewise.
809         * ssl.h: Likewise.
810         * sysdep.h: Likewise.
811         * test.c: Likewise.
812         * test.h: Likewise.
813         * url.c: Likewise.
814         * url.h: Likewise.
815         * utils.c: Likewise.
816         * utils.h: Likewise.
817         * wget.h: Likewise.
818
819 2010-05-07  Giuseppe Scrivano  <gscrivano@gnu.org>
820
821         * gnutls.c (wgnutls_close): Use always `close', not `closesocket'.
822         * openssl.c (openssl_close): Use always `close', not `closesocket'.
823         (ssl_connect_wget): Get the real socket handle by FD_TO_SOCKET.
824         Define FD_TO_SOCKET if it is not yet defined.
825         * Makefile.am (libunittest_a_CPPFLAGS): Add -I$(top_builddir)/lib.
826         * mswindows.h: Always include <winsock2.h> and <ws2tcpip.h>.  Do not
827         include <winsock.h>.
828         [! INHIBIT_WRAP]: Remove macro's socket, bind, connect, accept, recv,
829         send, select, getsockname, getpeername, setsockopt, closesocket.
830         Remove wrapped_socket, wrapped_bind, wrapped_connect, wrapped_listen,
831         wrapped_accept, wrapped_recv, wrapped_send, wrapped_select,
832         wrapped_getsockname, wrapped_getpeername, wrapped_setsockopt,
833         wrapped_closesocket prototypes.
834         * mswindows.c:  Remove wrapped_socket, wrapped_bind, wrapped_connect,
835         wrapped_listen, wrapped_accept, wrapped_recv, wrapped_send,
836         wrapped_select, wrapped_getsockname, wrapped_getpeername,
837         wrapped_setsockopt, wrapped_closesocket functions.  Remove WRAP macro.
838         * host.h [WINDOWS]: Include <winsock2.h> not <winsock.h>.
839         * connect.c: Include <sys/socket.h> and <sys/select.h> on any platform,
840         gnulib ensures they exist.  Remove `read', `write', `close' macros.
841         * Makefile.am: Copy build_info.c.in only if we are working in a VPATH.
842         (AM_CPPFLAGS): Add directory with generated gnulib files.
843
844 2010-05-06  Giuseppe Scrivano  <gscrivano@gnu.org>
845
846         * Makefile.am (build_info.c): Generate build_info.c in the builddir,
847         not srcdir.
848
849 2010-05-05  Giuseppe Scrivano  <gscrivano@gnu.org>
850
851         * http.c (gethttp): Give a nicer message on a malformed status line.
852
853 2010-05-04  Giuseppe Scrivano  <gscrivano@gnu.org>
854
855         * http.c (gethttp): Check `resp_status' return code and handle
856         errors.
857
858 2010-05-01  Giuseppe Scrivano <gscrivano@gnu.org>
859
860         * http.c (request_send): Specify 1.1 as HTTP version for requests.
861         (skip_short_body): Accept new parameter `chunked'.  New variable
862         `remaining_chunk_size'.  Handle the chunked transfer encoding.
863         (gethttp): New variable `chunked_transfer_encoding`.  Set `keepalive'
864         by default to true.  Check if the server is using the chunked transfer
865         encoding.
866
867         * retr.h: Define `rb_chunked_transfer_encoding'.
868
869         * retr.c (fd_read_body): New variable `chunked'.  New variable
870         `remaining_chunk_size'.  Handle the chunked transfer encoding.
871
872 2010-03-04  Steven Schubiger  <stsc@member.fsf.org>
873
874         * ftp.c (ftp_loop_internal): Omit input file from being
875         deleted after retrieval.
876
877         * retr.c (input_file_url): New function.
878
879         * retr.h: Add declaration for input_file_url.
880
881 2010-03-02  Steven Schubiger  <stsc@member.fsf.org>
882
883         * retr.c (retrieve_from_file): Improve checking for a URL
884         by invoking url_valid_scheme instead of url_has_scheme.
885
886         * url.c (url_valid_scheme): New function.
887
888         * url.h: Add declaration for url_valid_scheme.
889
890 2010-03-02  Steven Schubiger  <stsc@member.fsf.org>
891
892         * retr.c (retrieve_from_file): Free memory of input file.
893
894 2010-03-01  Steven Schubiger  <stsc@member.fsf.org>
895
896         * retr.c (retrieve_url): Retrieve the local filename from ftp_loop.
897         (retrieve_from_file): Return if there's no input file.
898
899         * ftp.c (ftp_loop_internal): Duplicate the local filename into
900         retrieve_url's scope when a valid reference is being passed.
901         (ftp_loop): Call ftp_loop_internal here with passing a
902         reference to the local filename, elsewhere with NULL.
903
904         * ftp.h: Adjust declaration of ftp_loop.
905
906 2010-01-27  Paul Townsend  <aab@purdue.edu>  (tiny change)
907
908         * retr.c (fd_read_body): Be sure to measure timer when time has
909         elapsed, too, not just when we've made progress.
910
911 2010-01-13  Micah Cowan  <micah@cowan.name>
912
913         * openssl.c: Fixed some mixed declarations-and-code.
914
915 2010-01-09  Micah Cowan  <micah@cowan.name>
916
917         * init.c, main.c, http.c, ftp.c, options.h: Renamed
918         --no-match-server-timestamps to --no-use-server-timestamps, and
919         add it to print_help.
920
921 2010-01-09  David Holman  <holman.david@gmail.com>  (tiny change)
922
923         * init.c, main.c, http.c, ftp.c, options.h: Added support for
924         --no-match-server-timestamps.
925
926 2009-12-03  Peter Rosin  <peda@lysator.liu.se>
927
928         * snprintf.c (dopr): Output %p as unsigned.
929
930 2010-01-09  Jeremy Olexa  <darkside@gentoo.org>  (tiny change)
931
932         * init.c: Deal with systems which provide PATH_MAX in
933         sys/param.h rather than limits.h.
934
935 2009-10-09  Steven Schweda  <sms@antinode.info>
936
937         * utils.c: Added characters " : \ | to the list of normal
938         caret-escaped (ODS5) characters in the char_prop[] table.
939
940 2009-09-22  Arvind Jamuna Dixit  <ardsrk@gmail.com>
941
942         * http.c (extract_param, parse_content_disposition): Support
943         RFC 2231 while parsing Content-Disposition header
944
945 2009-10-24  Petr Pisar  <petr.pisar@atlas.cz>
946
947         * openssl.c: Implement support for (multiple) subjectAltNames in
948         X509 certificates, not just the commonName.
949
950 2009-10-09  Micah Cowan  <micah@cowan.name>
951
952         * main.c: Fix declaration of compiled_features.
953
954         * build_info.c.in: Adapt to new input format. Added a check for
955         large-file support. Replaced the "openssl" and "gnutls"
956         advertisements with a single "ssl/foo" advertisement.
957
958 2009-09-30  Micah Cowan  <micah@cowan.name>
959
960         * sysdep.h: Unconditionally include stdbool.h (gnulib has it for
961         systems that don't supply it.)
962
963         * vms.c: Added functions vms_basename(), used to extract the
964         bare executable name from argv[0], and vms_getpass(), a
965         VMS-specific replacement for GNU getpass().
966
967          vms.c: Added global string constants: compilation_string
968         (NULL), link_string (NULL), and version_string (real).
969
970 2009-09-24  Micah Cowan  <micah@cowan.name>
971
972         * vms.c: Moved from vms/vms.c.
973
974         * sysdep.h: Use proper prototypes for snprintf, vsnprintf (thanks
975         to Steven Schweda).
976
977 2009-09-24  Steven Schweda  <sms@antinode.info>
978
979         * main.c (print_version): Remove VMS-conditional build info
980         string; the new VMS builders use OS_TYPE.
981
982         * ftp.c (getftp): Fix accidental use of target -> targ.
983
984 2009-09-24  Micah Cowan  <micah@cowan.name>
985
986         * host.c (host_errstr): host_errstr should return const char *.
987
988 2009-09-22  Micah Cowan  <micah@cowan.name>
989
990         * Makefile.am (version.c): Explicitly tell Mercurial where the
991         top-source repository should be, so it doesn't accidentally use
992         the repository for a containing directory (for instance, if the
993         user's home directory is managed by a Mercurial repo). Also
994         ensures we find the repository, even if the build directory is
995         outside the source directory.
996
997         * wget.h: define WINDOWS if _WIN32 or __WIN32__ is defined, but
998         not __CYGWIN__.
999
1000         * mswindows.c (xsleep): Check for availability of the sleep
1001         function, in addition to the usleep function.
1002         (get_winsock_error, windows_strerror): Removed (gnulib already
1003         supplies this functionality).
1004
1005         * mswindows.h [NEED_GAI_STRERROR]: define gai_strerror
1006         to (gnulib's) strerror, rather than windows_strerror. Removed
1007         error macro definitions provided by gnulib.
1008         (windows_strerror): Removed (gnulib already supplies this
1009         functionality).
1010
1011         * host.c: Don't declare h_errno when building on Windows.
1012
1013         * Makefile.am (LIBS): Added @W32LIBS@.
1014         (EXTRA_wget_SOURCES): Removed (it's in LIBOBJ now).
1015         (version.c): Removed dependency on $(LDADD), since it may include
1016         dependencies that are not part of the Wget sources (-lwsock32, for
1017         instance).
1018
1019         * openssl.c (ssl_check_certificate): Avoid reusing the same buffer
1020         space for successive quoted arguments. Thanks to Steven Schweda
1021         for pointing out the problem.
1022
1023 2009-09-21  Micah Cowan  <micah@cowan.name>
1024
1025         * progress.c (update_speed_ring): "the the" -> "the".
1026
1027         * css-url.c, iri.c, mswindows.c: Removed assert.h inclusion (not
1028         using it).
1029
1030 2009-09-11  Steven Schweda  <sms@antinode.info>
1031
1032         * utils.c, utils.h (fopen_excl): Make second argument an int,
1033         rather than a bool (so it can handle the appropriate VMS version
1034         of the flag).
1035
1036         * main.c (print_version): Don't print LOCALEDIR unless NLS is
1037         enabled.
1038
1039         * http.c (gethttp): Pass FOPEN_BIN_FLAG, instead of true.
1040
1041         * ftp.c (ftp_retrieve_glob): Cast strcmp to assign to cmp, for a
1042         silly HP build environment.
1043
1044 2009-09-08  Steven Schubiger  <stsc@member.fsf.org>
1045
1046         * main.c, init.c: Mark the --preserve-permissions and
1047         --html-extension option as deprecated.
1048
1049 2009-09-06  Micah Cowan  <micah@cowan.name>
1050
1051         * ftp.c (getftp, ftp_loop_internal): Separate "len" input/output
1052         parameter (with different meanings for input and output), into two
1053         separate parameters, one input (passed_expected_bytes) and one
1054         output (qtyread). Fixes bug #26870.
1055
1056 2009-09-05  Steven Schubiger  <stsc@member.fsf.org>
1057
1058         * retr.h: Declare set_local_file() to avoid build warnings.
1059
1060 2009-09-05  Gisle Vanem  <gvanem@broadpark.no>
1061
1062         * connect.c, init.c, main.c, openssl.c, options.h:  Replace
1063         "ifdef MSDOS" with "ifdef USE_WATT32" since DOS-targets in fact
1064         use the Watt-32 tcp/ip stack.
1065
1066 2009-09-04  Micah Cowan  <micah@cowan.name>
1067
1068         * Makefile.am: Move build_info.c to wget_SOURCES from
1069         nodist_wget_SOURCES, reduce dependencies, and invoke build_info.pl
1070         in its new home, $(top_srcdir)/build-aux.
1071
1072 2009-09-03  Micah Cowan  <micah@cowan.name>
1073
1074         * ftp-ls.c (ftp_parse_vms_ls): Replace use of localtime_r with
1075         localtime, as not all platforms have localtime_r.
1076
1077         * Makefile.am (wget_SOURCES): Rearranged some of the file order,
1078         so .c files and .h files are apart. Added gettext.h, so that it
1079         shows up in the dist.
1080
1081 2009-09-02  Micah Cowan  <micah@cowan.name>
1082
1083         * gettext.h: Refreshed from gettext 0.17.
1084
1085         * test.c: Added definition of program_name variable, required by
1086         lib/error.c (libgnu.a). Doesn't cause problems until you try to
1087         build on a non-GNU system...
1088
1089         * build_info.c.in: Removed useless "+gettext" feature ad.
1090
1091 2009-08-29  Steven Schubiger  <stsc@member.fsf.org>
1092
1093         * convert.c (local_quote_string): Percent-encode semicolons
1094         in local file strings.
1095
1096 2009-08-27  Micah Cowan  <micah@cowan.name>
1097
1098         * wget.h (uerr_t): added new VERIFCERTERR code for SSL certificate
1099         problems. Marked exit codes that are defined but never used (at
1100         least, the ones I could find).
1101
1102         * retr.c, retr.h (retrieve_url): Added a new boolean argument to
1103         determine whether an exit status should be recorded.
1104         (retrieve_from_file): Adjust to new retrieve_url signature.
1105
1106         * res.c (res_retrieve_file): Don't have retrieve_url record an
1107         exit status for robots.txt.
1108
1109         * recur.c (retrieve_tree): Adjust to new retrieve_url signature.
1110
1111         * main.c (main): Use the exit status stored by retrieve_url.
1112
1113         * http.c (gethttp): Distinguish certificate verification problems
1114         from SSL connection issues.
1115         (http_loop): Handle newly-created VERIFCERTERR error code.
1116
1117         * exits.c, exits.h: Newly added.
1118
1119         * Makefile.am (wget_SOURCES): Add exits.c and exits.h.
1120
1121 2009-08-27  Micah Cowan  <micah@cowan.name>
1122
1123         * http.c (gethttp): Make sure Wget heeds cookies when they
1124         are sent with a 401 response; or any other sort of response for
1125         that matter (#26775).
1126
1127 2009-08-19  Micah Cowan  <micah@cowan.name>
1128
1129         * openssl.c (ssl_check_certificate): Only warn about an attack if
1130         the hostname would otherwise have matched. Also some formatting
1131         cleanup.
1132
1133 2009-08-19  Joao Ferreira  <joao@joaoff.com>
1134
1135         * openssl.c (ssl_check_certificate): Detect embedded NUL
1136         characters in the SSL certificate common name.
1137
1138 2009-08-17  Tony Lewis  <tlewis@exelana.com>
1139
1140         * http.c (gethttp): Ensure that we parse Content-Length before we
1141         attempt to refer to its value. Without this fix, NTLM support was
1142         completely buggered. #27192
1143
1144 2009-08-09  Michael Baeuerle  <michael.baeuerle@gmx.net>
1145
1146         * ftp.c: #include <strings.h> for strcasecmp.
1147
1148 2009-07-28  Micah Cowan  <micah@cowan.name>
1149
1150         * main.c (option_data): Rename --html-extension to
1151         --adjust-extension.
1152         (print_help): Ditto.
1153
1154         * options.h (struct option): Rename html_extension to
1155         adjust_extension.
1156         * http.c (gethttp): Ditto.
1157         * convert.c (local_quote_string): Ditto.
1158
1159         * init.c (commands): Add "adjustextension", and reflect rename
1160         change for opt.adjust_extension, for both "adjustextension" and
1161         "htmlextension".
1162
1163 2009-07-27  Micah Cowan  <micah@cowan.name>
1164
1165         * options.h (struct options): Added restrict_files_nonascii
1166         boolean field.
1167
1168         * url.c (FILE_CHAR_TEST): Add check for chars outside the ASCII
1169         range.
1170
1171         * init.c (defaults): Add restrict_files_nonascii to initialization.
1172         (cmd_spec_restrict_file_names): Allow parsing of "ascii" keyword.
1173
1174 2009-07-27  Marcel Telka  <marcel@telka.sk>
1175
1176         * iri.c (do_conversion): Typo: invalide -> invalid
1177
1178 2009-07-27  Petr Pisar  <petr.pisar@atlas.cz>
1179
1180         * main.c (print_help): Fixed a couple typos.
1181
1182 2009-07-26  Micah Cowan  <micah@cowan.name>
1183
1184         * main.c (option_data): Rename --locale option to --local-encoding
1185         (print_help): Document --no-iri, --local-encoding, and
1186         --remote-encoding, within usage message. Remove defunct
1187         --preserve-permissions.
1188
1189 2009-07-23  Micah Cowan  <micah@cowan.name>
1190
1191         * progress.c (get_eta): Change "Translation note" in comment to
1192         "TRANSLATORS", so it actually appears in wget.pot.
1193
1194 2009-07-06  Micah Cowan  <micah@cowan.name>
1195
1196         * main.c (print_help): Improve documentation of --base.
1197
1198 2009-07-05  Micah Cowan  <micah@cowan.name>
1199
1200         * html-url.c (tag_handle_meta): Handle meta name="robots"
1201         properly: deal with whitespace, commas after...
1202
1203         * netrc.c (parse_netrc): Rename local-scope variable "quote" to
1204         "qmark", to avoid conflict with the function name.
1205
1206 2009-07-05  Petr Pisar  <petr.pisar@atlas.cz>
1207
1208         * main.c (print_version): Mark initial line for translation, along
1209         with (env), (user), and (system). Change copyright year to 2009.
1210
1211         * http.c (http_loop): Space after colon.
1212
1213         * gnutls.c (ssl_check_certificate): Use quote function, rather
1214         than explicit quotes.
1215
1216 2009-07-05  Micah Cowan  <micah@cowan.name>
1217
1218         * Makefile.am (version.c): Add dependency on configure.ac.
1219
1220         * iri.c: Mark some strings for translation.
1221
1222 2009-07-04  Steven Schweda  <sms@antinode.info>
1223
1224         * wget.h (ORIG_SFX): Macro added, to supply an alternative "_orig"
1225         suffix on VMS.
1226
1227         * connect.c, host.c, host.h, main.c: Include "vms_ip.h" rather
1228         than <netdb.h> on VMS systems.
1229
1230         * convert.c (write_backup_file): Use "_orig" rather than ".orig"
1231         on VMS.
1232
1233         * ftp-basic.c (ftp_list): Don't use LIST -a on VMS servers.
1234
1235         * ftp.c [__VMS]: Include "vms.h"
1236         * ftp.c (getftp): Disable some unhelpful "for VMS" code. Pass the
1237         OS type to ftp_list.
1238         (getftp) [__VMS]: Alter the filename as required, and invoke fopen
1239         with extra optional arguments.
1240         (ftp_retrieve_list): Set permissions before setting the times.
1241
1242         * ftp-ls.c [__VMS]: Various improvements.
1243
1244         * http.c (SET_USER_AGENT): Added. Include operating-system info in
1245         the User-Agent header.
1246         (gethttp): Use ORIG_SFX macro.
1247         (gethttp) [__VMS]: invoke fopen with extra arguments to
1248         communicate file type.
1249         (http_loop): Add cast to time_t.
1250
1251         * init.c (wgetrc_user_file_name) [__VMS]: Adjustments for where to
1252         find the .wgetrc.
1253
1254         * log.c: Adjustments to improve handling of log files on VMS.
1255
1256         * main.c [__VMS]: Added --ftp-stmlf option (and associated
1257         documentation). Adjust description of backup-suffixes, as they now
1258         differ for VMS.
1259         (print_help, print_version): Include OS type in version
1260         information.
1261         (main) [__VMS]: Invoke fopen with extra options, to specify file
1262         type information.
1263
1264         * netrc.c (search_netrc) [__VMS]: Fix .netrc-finding.
1265
1266         * openssl.c, openssl.h (ssl_connect_wget): Renamed from ssl_connect.
1267
1268         * options.h (struct options): Add ftp_stmlf field.
1269
1270         * retr.c (write_data) [__VMS]: Avoid fflush.
1271
1272         * url.c [__VMS]: Include vms.h.
1273         * url.c (url_file_name) [__VMS]: Handle naming as required for VMS.
1274
1275         * utils.c [__VMS]: Include vms.h. Various added facilities for VMS
1276         needs.
1277
1278 2009-07-04  Micah Cowan  <micah@cowan.name>
1279
1280         * main.c (print_version): Allow localization of the version-info
1281         labels, eschew attempts at alignment (which is complicated when
1282         handling translated strings), and avoid using printf() with
1283         variable-stored format strings that lack conversion
1284         specifications.
1285         (format_and_print_line): For similar reasons, don't calculate
1286         line-continuation tabulation based on the number of bytes in a
1287         string.
1288
1289 2009-07-04  Steven Schubiger  <stsc@member.fsf.org>
1290
1291         * url.c (url_parse): If an URL scheme is invalid, distinguish
1292         between an unsupported or missing scheme.
1293
1294         * url.c: Add a "missing scheme" entry to parse_errors.
1295
1296 2009-07-03  Micah Cowan  <micah@cowan.name>
1297
1298         * iri.h (iri_dup): Provide macro definition for when IRIs are
1299         disabled.
1300
1301         * Makefile.am (LIBS): Added @LIBICONV@.
1302         (wget_SOURCES): Added iri.h.
1303         (EXTRA_wget_SOURCES): Added iri.c, so it gets packaged even if IRI
1304         support was disabled.
1305
1306 2009-07-02  Micah Cowan  <micah@cowan.name>
1307
1308         * recur.c (url_enqueue): Quote enqueue/dequeue debug messages.
1309
1310         * html-url.c (append_url): Change "merge()" quoting style from
1311         locale_quoting_style to escape_quoting_style.
1312
1313 2009-07-01  Micah Cowan  <micah@cowan.name>
1314
1315         * retr.c (retrieve_url): Use the existing "redirect" label,
1316         instead of superfluous "second_try". Removed no-longer-accurate
1317         debug statement. Use the "newloc" parameter to store the fallback
1318         URL, when IRI version was rejected.
1319
1320         * recur.c (retrieve_tree): Always use the parsed URL for tracking
1321         the Referer, since that's the one we actually requested (if
1322         there's a difference in terms of percent-encodings and such).
1323
1324 2009-07-01  Steven Schubiger  <stsc@member.fsf.org>
1325
1326         * Makefile.am: Add a rule to generate build_info.c and list
1327         the build_info.c.in file in EXTRA_DIST. Adjust elsewhere
1328         where needed.
1329
1330         * build_info.c: Remove this static source file.
1331
1332         * build_info.c.in: Data for generation of build_info.c.
1333
1334 2009-06-29  Micah Cowan  <micah@cowan.name>
1335
1336         * html-url.c (append_url): Quote some more arguments that might
1337         contain characters that are inappropriate to display for the
1338         current locale.
1339
1340         * retr.c (retrieve_from_file): Be sure to pass iri information
1341         when parsing an input-fle url, and be sure to hand a clean iri
1342         struct, off to retrieve_tree and retrieve_url.
1343
1344         * iri.c, iri.h (iri_dup): Added.
1345
1346         * retr.c (retrieve_url): Re-parse for IRI fallback.
1347
1348         * main.c (main): Set up iri before the url_parse invocation (so we
1349         can use it).
1350
1351 2009-06-20  Jay Krell  <jay.krell@cornell.edu>
1352
1353         * sysdep.h (_ALL_SOURCE): (small change) Define the _ALL_SOURCE
1354         macro on INTERIX systems. (I switched the location from ftp.c to
1355         sysdep.h --mjc)
1356
1357 2009-06-15  Micah Cowan  <micah@cowan.name>
1358
1359         * ftp.c (getftp): If we can't accept the connection, return
1360         CONERROR, not whatever the contents of err happens to be. Fixes
1361         bug #25015.
1362
1363         * retr.c (fd_read_body): Make both args to progress_create
1364         consistent, resulting in an accurate progress display. Fixes bug
1365         #24948.
1366
1367 2009-06-14  Micah Cowan  <micah@cowan.name>
1368
1369         * Makefile.am (wget_SOURCES): css-tokens.h needs to ship with
1370         dist, too.
1371
1372 2009-06-13  Micah Cowan  <micah@cowan.name>
1373
1374         * init.c: Rename setval_internal_wrapper to setval_internal_tilde,
1375         ensure we don't "replace" the tilde unless it's actually
1376         present. Clean up some minor GNU style issues.
1377
1378 2009-06-13  Julien Pichon  <julienpichon7@gmail.com>
1379
1380         * init.c: Handle tilde-expansion in wgetrc commands, without
1381         resorting to setting/unsetting globals to change behavior in one
1382         call location.
1383
1384 2009-06-12  Micah Cowan  <micah@cowan.name>
1385
1386         * host.c: Include <sys/types.h> before <sys/socket.h>. Not
1387         required by POSIX any more, but some older systems (such as
1388         FreeBSD 4.1) still need it, and it doesn't seem like it could
1389         hurt...
1390
1391         * build_info.c (library): Handle "https" as a feature in its own
1392         right, apart from "gnutls" and "openssl".
1393
1394         * host.c: Declare h_errno if no declaration is provided. Idea
1395         thanks to Maciej W. Rozycki.
1396
1397 2009-06-11  Xin Zou  <zouxin2008@gmail.com>
1398
1399         * http.c (gethttp): Fix some memory leaks.
1400
1401 2009-06-11  Micah Cowan  <micah@cowan.name>
1402
1403         * http.c (http_atotm): Handle potential for setlocale's return
1404         value to be static storage. Thanks to Benjamin Wolsey
1405         <bwy@benjaminwolsey.de>.
1406
1407         * sysdep.h: Need NAMESPACE_TWEAKS on non-Linux glibc-based
1408         systems, too. Thanks to Robert Millan.
1409
1410 2009-05-28  Steven Schubiger  <stsc@member.fsf.org>
1411
1412         * ftp.c (ftp_get_listing): Update the "listing file"
1413         string after calling ftp_loop_internal().
1414
1415 2009-05-27  Steven Schubiger  <stsc@member.fsf.org>
1416
1417         * ftp.c (ftp_get_listing): Duplicate the "listing file"
1418         string to avoid memory corruption when FOPEN_EXCL_ERR is
1419         encountered.
1420
1421 2009-05-17  Steven Schubiger  <stsc@member.fsf.org>
1422
1423         * progress.c (eta_to_human_short): Fix the remaining hours
1424         to be displayed. Spotted by Tadeu Martins (#26411).
1425
1426 2009-04-24  Micah Cowan  <micah@cowan.name>
1427
1428         * hash.c: Change stdint.h inclusion to use HAVE_STDINT_H, not C99
1429         check.
1430
1431         * connect.c: stdint.h inclusion added.
1432
1433         Thanks to Markus Duft <mduft@gentoo.org> for a similar patch.
1434
1435 2009-04-20  Micah Cowan  <micah@cowan.name>
1436
1437         * Makefile.am (version.c): Fix unportable use of "echo -n".
1438
1439 2009-04-13  Steven Schubiger  <stsc@member.fsf.org>
1440
1441         * ftp.c (ftp_retrieve_list): Move the duplicated code that
1442         determines the local file to a function.
1443
1444         * http.c (http_loop): Likewise.
1445
1446         * retr.c (set_local_file): New function.
1447
1448 2009-04-11  Steven Schubiger  <stsc@member.fsf.org>
1449
1450         * init.c (initialize): Run a custom SYSTEM_WGETRC when
1451         provided as an environment variable.
1452
1453 2009-02-27  Gisle Vanem  <gvanem@broadpark.no>
1454
1455         * main.c (main): "freopen (NULL,.." causes an assertion in MSVC
1456         debug-mode.  I.e. NULL isn't legal. But the "CONOUT$" device works
1457         fine.
1458
1459 2009-02-27  Steven Schubiger  <stsc@member.fsf.org>
1460
1461         * ftp.c (ftp_loop_internal): Don't claim for FTP retrievals
1462         when writing to standard output either that the document
1463         has been saved. Addresses bug #20520 again.
1464
1465 2009-02-21  Steven Schubiger  <stsc@member.fsf.org>
1466
1467         * http.c (http_loop): When a document is written to
1468         standard output, don't claim it has been saved to a file.
1469         Addresses bug #20520.
1470
1471 2009-02-18  Steven Schubiger  <stsc@members.fsf.org>
1472
1473         * recur.h: Remove the dangling declaration for recursive_cleanup().
1474
1475 2009-02-01  Gerardo E. Gidoni  <gerel@gnu.org>
1476
1477         * main.c, recur.c, recur.h, res.c, retr.c, retr.h: restructured code to
1478         avoid multiple 'url_parse' calls.
1479
1480 2008-11-13  Micah Cowan  <micah@cowan.name>
1481
1482         * http.c (gethttp): Don't do anything when content-length >= our
1483         requested range.
1484
1485 2008-11-27  Saint Xavier  <wget@sxav.eu>
1486
1487         * http.c (gethttp): Move authentication code before filename
1488         allocation avoiding fallbacking on default filename because
1489         "Content-Disposition" header wasn't present before authentcation
1490         has been completed. Fixes bug #24862.
1491
1492 2008-11-16  Steven Schubiger  <stsc@members.fsf.org>
1493
1494         * main.c: Declare and initialize the numurls counter.
1495
1496         * ftp.c, http.c: Make the counter visible here and use it.
1497
1498         * options.h: Remove old declaration from options struct.
1499
1500 2008-11-15  Steven Schubiger  <stsc@members.fsf.org>
1501
1502         * init.c (defaults): Set default waitretry value.
1503
1504 2008-11-14  Steven Schubiger  <stsc@members.fsf.org>
1505
1506         * main.c (format_and_print_line): Use a custom format
1507         string for printing leading spaces.
1508
1509 2008-11-12  Micah Cowan  <micah@cowan.name>
1510
1511         * ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href.
1512
1513 2008-11-12  Alexander Belopolsky  <alexander.belopolsky@gmail.com>
1514
1515         * url.c, url.h (url_escape_unsafe_and_reserved): Added.
1516
1517         * ftp-ls.c (ftp_index): URL-escape, rather than HTML-escape, the
1518         filename appearing in the link.
1519
1520 2008-11-12  Steven Schubiger  <stsc@members.fsf.org>
1521
1522         * main.c (print_version): Hand the relevant
1523         xstrdup/xfree calls back to format_and_print_line().
1524
1525 2008-11-11  Steven Schubiger  <stsc@members.fsf.org>
1526
1527         * main.c (format_and_print_line): Move both the memory
1528         allocating and freeing bits upwards to print_version().
1529
1530 2008-11-10  Saint Xavier  <wget@sxav.eu>
1531
1532         * http.c: Make --auth-no-challenge works with user:pass@ in URLs.
1533
1534 2008-11-05  Micah Cowan  <micah@cowan.name>
1535
1536         * ftp.c (print_length): Should print humanized "size remaining"
1537         only when it's at least 1k.
1538
1539 2008-10-31  Micah Cowan  <micah@cowan.name>
1540
1541         * main.c (print_version): Add information about the mailing list.
1542
1543 2008-10-31  Alexander Drozdov  <dzal_mail@mtu-net.ru>
1544
1545         * retr.c (fd_read_hunk): Make assert deal with maxsize == 0.
1546
1547         * ftp-ls.c (clean_line): Prevent underflow on empty lines.
1548
1549 2008-10-26  Gisle Vanem  <gvanem@broadpark.no>
1550
1551         * main.c (format_and_print_line): Put variables on top of
1552         blocks (not all compilers are C99). Add an extra '\n' if
1553         SYSTEM_WGETRC isn't defined and printed.
1554
1555 2008-09-09  Gisle Vanem  <gvanem@broadpark.no>
1556
1557         * url.c (url_error): Use aprintf, not asprintf.
1558
1559 2008-09-09  Micah Cowan  <micah@cowan.name>
1560
1561         * init.c (home_dir): Save the calculated value for home,
1562         to avoid duplicated work on repeated calls.
1563         (wgetrc_file_name) [WINDOWS]: Define and initialize home var.
1564
1565         * build_info.c, main.c: Remove unnecessary extern vars
1566         system_wgetrc and locale_dir.
1567
1568         * main.c: Define program_name for lib/error.c.
1569
1570 2008-09-02  Gisle Vanem  <gvanem@broadpark.no>
1571
1572         * mswindows.h: Must ensure <stdio.h> is included before
1573         we redefine ?vsnprintf().
1574
1575 2008-08-08  Steven Schubiger  <stsc@members.fsf.org>
1576
1577         * main.c, utils.h: Removed some dead conditional DEBUG_MALLOC code.
1578
1579 2008-08-03  Micah Cowan  <micah@cowan.name>
1580
1581         * main.c (print_help): Added --default-page.
1582
1583 2008-08-01  Joao Ferreira  <joao@joaoff.com>
1584
1585         * init.c, main.c, options.h, url.c: Added option --default-page
1586         to support alternative default names for index.html
1587
1588 2008-08-03  Micah Cowan  <micah@cowan.name>
1589
1590         * build_info.c, css-url.c: #include wget.h, not config.h.
1591
1592 2008-08-03  Steven Schubiger  <stsc@members.fsf.org>
1593
1594         * url.c, url.h (url_error): Better messages for unsupported
1595         schemes, especially https.
1596
1597         * html-url.c, recur.c, retr.c: Adjust to new url_error
1598         invocation, and free result.
1599
1600 2008-07-17  Steven Schubiger  <stsc@members.fsf.org>
1601
1602         * retr.c (retrieve_from_file): When given an URL as input file,
1603         use it as baseref if none was specified and treat the input file
1604         as HTML if its content type is text/html.
1605
1606         * init.c (cleanup): Free the memory associated with the base
1607         option (when DEBUG_MALLOC is defined).
1608
1609 2008-07-02  Xavier Saint  <wget@sxav.eu>
1610
1611         * iri.c, iri.h  : New function idn_decode() to decode ASCII
1612         encoded hostname to the locale.
1613
1614         * host.c : Show hostname to be resolved both in locale and
1615         ASCII encoded.
1616
1617 2008-06-28  Steven Schubiger  <stsc@members.fsf.org>
1618
1619         * retr.c (retrieve_from_file): Allow for reading the links from
1620         an external file (HTTP/FTP).
1621
1622 2008-06-26  Xavier Saint  <wget@sxav.eu>
1623
1624         * iri.c, iri.h : New functions locale_to_utf8() and
1625         idn_encode() adding basic capabilities of IRI/IDN.
1626
1627         * url.c : Convert URLs from locale to UTF-8 allowing a basic
1628         support of IRI/IDN
1629
1630 2008-06-25  Steven Schubiger  <stsc@members.fsf.org>
1631
1632         * ftp.c (getftp): When spidering a FTP URL, emit a diagnostic
1633         message if the remote file exists.
1634
1635 2008-06-24  Steven Schubiger  <stsc@members.fsf.org>
1636
1637         * http.c (http_loop): Replace escnonprint() occurence with
1638         a quotearg_style() call.
1639
1640 2008-06-24  Micah Cowan  <micah@cowan.name>
1641
1642         * ftp-ls.c (ftp_index): Don't assume time_t* is compatible with
1643         long*. Fixes crash on Windows, and probably other systems.
1644
1645 2008-06-22  Steven Schubiger  <stsc@members.fsf.org>
1646
1647         * http.c: Explicitly initialize and deallocate the message
1648         string used by the -nv --spider functionality.
1649
1650 2008-06-22  Steven Schubiger  <schubiger@gmail.com>
1651
1652         * http.c: Make -nv --spider include the file's name when it
1653         exists.
1654
1655 2008-06-22  Micah Cowan  <micah@cowan.name>
1656
1657         * Makefile.am (version.c): Fixed version string invocation so it
1658         once again can't result in unterminated strings, made all the
1659         string vars pointers-to-const, and moved line lengths
1660         below 80 (in Makefile.am, not in version.c).
1661
1662 2008-06-19  Xavier Saint  <wget@sxav.eu>
1663
1664         * iri.c, iri.h : New function check_encoding_name() as
1665         a preliminary encoding name check.
1666
1667         * main.c, iri.c : Make use of check_encoding_name().
1668
1669 2008-06-19  Xavier Saint  <wget@sxav.eu>
1670
1671         * iri.c : Include missing stringprep.h file and add a
1672         cast.
1673
1674         * init.c : set a default initial value for opt.enable_iri,
1675         opt.locale and opt.encoding_remote.
1676
1677 2008-06-19  Xavier Saint  <wget@sxav.eu>
1678
1679         * iri.c, iri.h : Add a new function find_locale() to find
1680         out the local system encoding.
1681
1682         * main.c : Make use of find_locale().
1683
1684 2008-06-19  Xavier Saint  <wget@sxav.eu>
1685
1686         * html-url.c : Add "content-type" meta tag parsing for
1687         retrieving page encoding.
1688
1689         * iri.h : Make no-op version of parse_charset() return
1690         NULL.
1691
1692 2008-06-16  Micah Cowan  <micah@cowan.name>
1693
1694         * http.c (http_loop): When hstat.len is higher than the
1695         successfully completed content's length, but it's because we
1696         _set_ it that way, don't abort.
1697
1698 2008-06-14  Xavier Saint  <wget@sxav.eu>
1699
1700         * iri.c, iri.h : New files.
1701
1702         * Makefile.am : Add files iri.h and conditional iri.c.
1703
1704         * build_info.c : Add compiled feature "iri".
1705
1706         * http.c : include iri.h and parse charset from Content-Type
1707         header.
1708
1709         * init.c, main.c, options.h : if an options isn't supported
1710         at compiled time, don't get rid off it and show a dummy
1711         message instead if they are used.
1712
1713 2008-06-13  Micah Cowan  <micah@cowan.name>
1714
1715         * build_info.c: ENABLE_NTLM, not HAVE_NTLM; distinguish OpenSSL
1716         from "ssl".
1717
1718 2008-06-13  Madhusudan Hosaagrahara <com.gmail.hrmadhu>
1719
1720         * Makefile.am, main.c, init.c, init.h, build_info.c: Adds build
1721         information to the --version command line option. Fixes bug
1722         #20636.
1723
1724 2008-06-01  Micah Cowan  <micah@cowan.name>
1725
1726         * main.c [WINDOWS]: Reopen stdout in binary mode, when -O - is
1727         given.
1728
1729 2008-05-31 Micah Cowan  <micah@cowan.name>
1730
1731         * html-url.c, http.c: Avoid casts in a couple spots.
1732
1733 2008-05-30 Henri Häkkinen  <henux@users.sourceforge.net>
1734
1735         * cookies.c, ftp-basic.c, hash.c, html-url.c, http-ntlm.c, http.c,
1736         init.c, log.c, main.c, progress.c, ptimer.c, spider.c, url.c,
1737         utils.c: Minor changes to silence warnings when using -Wall.
1738
1739 2008-05-26  Steven Schubiger  <schubiger@gmail.com>
1740
1741         * ftp.c (getftp): Replace last remaining invocation of escnonprint
1742         with gnulib quote.
1743
1744 2008-05-19  Micah Cowan  <micah@cowan.name>
1745
1746         * main.c (main): Password prompt should be done only once (not
1747         once per argument), and should be done prior to the background
1748         fork.
1749
1750 2008-05-17  Steven Schubiger  <schubiger@gmail.com>
1751
1752         * init.c (defaults): Set the preferred IP family to `none' by
1753         default.
1754
1755 2008-05-17  Kenny Parnell  <k.parnell@gmail.com>
1756
1757         (cmd_spec_prefer_family): Initialize prefer_family to prefer_none.
1758
1759 2008-05-17  Micah Cowan  <micah@cowan.name>
1760
1761         * main.c (main): Handle Ctrl-D on command-line.
1762
1763 2008-05-15  Steven Schubiger  <schubiger@gmail.com>
1764
1765         * ftp.c (getftp): Verify that the file actually exists in FTP, by
1766         checking it against the listing.
1767
1768 2008-05-15  Micah Cowan  <micah@cowan.name>
1769
1770         * main.c (prompt_for_password): Use the quote module.
1771
1772 2008-05-14  Micah Cowan  <micah@cowan.name>
1773
1774         * ftp.c (ftp_retrieve_list): Symlinks and other filenames
1775         should be fully quoted.
1776
1777 2008-05-12  Micah Cowan  <micah@cowan.name>
1778
1779         * main.c (main): Downgrade "-N with -O" to a warning, and switch
1780         it off to avoid confusing messages.
1781
1782 2008-04-30  Micah Cowan  <micah@cowan.name>
1783
1784         * progress.c (create_image): Fix glitch where too many spaces are
1785         printed on lines that don't display the ETA, in multibyte
1786         locales.
1787
1788 2008-04-30  Steven Schubiger  <stsc@members.fsf.org>
1789
1790         * main.c (main): New code that handles prompting for passwords
1791         when specified explicitly via command-line option (using gnulib's
1792         getpass-gnu module).
1793         (main): Include the getpass header.
1794
1795         * init.c: Add "ask-password" to the list of recognized commands.
1796
1797         * options.h: Add an according boolean member to the options
1798         struct.
1799
1800         * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
1801         out, because they're now defined independently by config.h.
1802
1803 2008-04-27  Rabin Vincent  <rabin@rab.in>
1804
1805         * http.c (http_loop): Fix return for the case where we don't
1806         download a file because of -nc.
1807
1808 2008-04-27  Micah Cowan  <micah@cowan.name>
1809
1810         * url.c (path_simplify): Go back to allowing leading ".." in
1811         paths, but only for FTP URLs.
1812         (test_path_simplify): Add scheme-specificness to tests, adapt for
1813         mu_run_test.
1814
1815         * test.c (all_tests): Add test_path_simplify.
1816
1817         * main.c (main): Downgrade -r, -p with -O to a warning rather than
1818         an error; elaborate just a bit more for other -O combination
1819         cases.
1820
1821 2008-04-26  Micah Cowan  <micah@cowan.name>
1822
1823         * http.c (gethttp): Move proxy CONNECT handling to below the
1824         retry_with_auth label, to deal with properly reconnecting to
1825         proxies when we need to authenticate.
1826
1827 2008-04-25  Micah Cowan  <micah@cowan.name>
1828
1829         * Makefile.am: -I foo -> -Ifoo.
1830
1831 2008-04-24  Micah Cowan  <micah@cowan.name>
1832
1833         * main.c: Revised usage description of --convert-links to apply
1834         to CSS as well as to HTML.
1835
1836 2008-04-23  Micah Cowan  <micah@cowan.name>
1837
1838         * utils.c (test_dir_matches_p): Added a test for the case
1839         described in issue #20518.
1840
1841 2008-04-22  Micah Cowan  <micah@cowan.name>
1842
1843         * Makefile.am, css.lex, css.l: Renamed css.lex to css.l.
1844         * recur.c (retrieve_tree): Fix typo to allow text/css files to
1845         be parsed.
1846
1847 2008-04-22  Ted Mielczarek  <ted.mielczarek@gmail.com>
1848
1849         * css.lex, css-url.c, css-url.h: Added to implement support for
1850         parsing CSS in Wget.
1851         * convert.c: Convert links in CSS files, too.
1852         * convert.h (convert_options): Added for options link_css_p,
1853         link_expect_css.
1854         * convert.h: Added prototype for new register_css function.
1855         * html-parse.c: Added support for parsing element content, in
1856         addition to tag starts and ends.
1857         * html-parse.h (taginfo): Added delimiter fields for element
1858         content.
1859         * html-url.h: Added.
1860         * html-url.c (append_url): No longer internal-linkage only. Now
1861         takes position and size as explicit parameters.
1862         * html-url.c: Use new html-url.h header, add support for
1863         handling of "style" HTML attributes. Mark URIs obtained from
1864         link tags with rel="stylesheet" with link_expect_css. Adapt
1865         uses of append_url to supply the newly-added parameters for
1866         position and size.
1867         * http.c: Add detection for when the content-type is text/css;
1868         and ensure that such files have the ".css" filename extension,
1869         when --convert-links is active.
1870         * recur.h: Remove declarations for functions found in
1871         html-url.c (moved to html-url.h).
1872         * recur.c: Add support for culling links from CSS files, too,
1873         and tracking for when we're expecting the file to be CSS (even
1874         when its content type isn't text/css).
1875         * retr.c (retrieve_url): Add registration of CSS files.
1876         * wget.h: Added TEXTCSS to dt flags enum.
1877         * Makefile.am: Added css.lex, css-url.c, css-url.h, html-url.h
1878         to wget_SOURCES.
1879
1880 2008-04-22  Jim Paris  <jim@jtan.com>
1881
1882         * openssl.c (ssl_init): Enable combined certificate/key in
1883         single file (apparent regression from ~1.9). Resolves issue
1884         #22767.
1885
1886 2008-04-22  Steven Schubiger  <schubiger@gmail.com>
1887
1888         * http.c (print_response_line): Changed to make responses always
1889         be logged, even in --quiet mode, if --server-response was
1890         specified. This is to bring http.c's handling of the situation
1891         in line with ftp.c's.
1892
1893 2008-04-22  Pranab Shenoy  <pranab.loosinit.shenoy@gmail.com>
1894
1895         * init.c: Added test_commands_sorted unit test to check is
1896         commands are sorted.  Fixes bug #21245.
1897
1898         * test.c: Added test_commands_sorted to the test suite.
1899
1900 2008-04-22  Rabin Vincent  <rabin@rab.in>
1901
1902         * ftp.c (ftp_get_listing): Only remove .listing if it has been
1903         created.
1904
1905 2008-04-22  Alain Guibert  <alguibert+bts@free.fr>
1906
1907         * test.h (mu_run_test): Move declaration before statements, for
1908         C90 conformance. Fixes bug #22789.
1909
1910 2008-04-22  Mike Frysinger  <vapier@gentoo.org>
1911
1912         * Makefile.am: Move @LIBS@ after other libraries, for better
1913         static-linking support. Fixes bug #22143.
1914
1915 2008-04-16  Steven Schubiger  <schubiger@gmail.com>
1916
1917         * ftp.c: Use Gnulib's quote function for printing filenames and
1918         such.
1919         * connect.c: Likewise.
1920         * convert.c: Likewise.
1921         * cookies.c: Likewise.
1922         * ftp-opie.c: Likewise.
1923         * gnutls.c: Likewise.
1924         * init.c: Likewise.
1925         * log.c: Likewise.
1926         * mswindows.c: Likewise.
1927         * openssl.c: Likewise.
1928         * progress.c: Likewise.
1929         * recur.c: Likewise.
1930         * res.c: Likewise.
1931         * utils.c: Likewise.
1932
1933 2008-04-16  Steven Schubiger  <schubiger@gmail.com>
1934
1935         * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
1936         out, because they're now defined independently by config.h.
1937
1938 2008-04-14  Steven Schubiger  <schubiger@gmail.com>
1939
1940         * http.c: Use Gnulib's quote function for printing filenames and
1941         such.
1942         * wget.h: #include "quote.h".
1943
1944 2008-04-12  Rabin Vincent  <rabin@rab.in>
1945
1946         * mswindows.c (fake_fork_child): Don't create a logfile for
1947         --background when --quiet is used, but not --server-response.
1948         Fixes bug #20917.
1949
1950         * utils.c (fork_to_background): Likewise.
1951
1952 2008-04-12  Micah Cowan  <micah@cowan.name>
1953
1954         * utils.c (aprintf): Minor formatting changes to Alex's code (80-
1955         column limit, concatenated string literals, avoiding nesting
1956         levels), and removed invocation of free (since we're aborting
1957         anyway).
1958
1959 2008-04-11  Alexander Dergachev  <cy6erbr4in@gmail.com>
1960
1961         * utils.c (aprintf): Now we are setting limits (1 Mb) for text
1962         buffer when we use non-C99 vsnprintf.
1963
1964 2008-04-11  Micah Cowan  <micah@cowan.name>
1965
1966         * ftp.c (getftp, ftp_loop_internal): Don't append to an existing
1967         .listing when --continue is used.  Fixes bug #22825. Thanks to
1968         Rabin Vincent <rabin@rab.in> for pointing the way with a
1969         suggested fix!
1970
1971 2008-04-10  Alexander Dergachev  <cy6erbr4in@gmail.com>
1972
1973         * xmalloc.c, xmalloc.h (memfatal): Now exported; accepts an
1974         "unknown" value for the attempted allocation size.
1975         * utils.c (aprintf): Now calls memfatal, instead of aborting.
1976
1977 2008-03-19  Micah Cowan  <micah@cowan.name>
1978
1979         * utils.c (test_dir_matches_p): More tests related for
1980         dir_matches_p.
1981
1982 2008-03-17  Micah Cowan  <micah@cowan.name>
1983
1984         * connect.c: Include sys/time.h to support use of the select
1985         function on older systems.
1986
1987 2008-02-11  Benno Schulenberg  <bensberg@justemail.net>
1988
1989         * http.c: More accurate and descriptive messages for when a file
1990         won't be retrieved during spider-mode.
1991
1992 2008-02-10  Micah Cowan  <micah@cowan.name>
1993
1994         * http.c: Added existence_checked member to the http_stat
1995         struct.
1996         (gethttp): Mark hs->existence_checked when we've checked whether
1997         a file-to-download exists; so we don't check it again if the
1998         connection gets lost (and potentially pick a new "unique" name).
1999         This fixes bug 22251.
2000         * progress.c (create_image): Add space for an extra column in
2001         the "eta" portion of the progress bar image; to deal with
2002         too-long Czech translation.
2003         * main.c, http.c, init.c: Added --auth-no-challenge option, to
2004         bring back 1.10.2 unsafe auth behavior when needed. This fixes
2005         bug #22242.
2006
2007 2008-02-07  Micah Cowan  <micah@cowan.name>
2008
2009         * progress.c (create_image): Remove assertion on exceeding
2010         screen width, which given the less-than-robust code there, can
2011         be broken by a number of factors (such as large file downloads).
2012
2013 2008-02-06  Micah Cowan  <micah@cowan.name>
2014
2015         * progress.c (countcols): Use strlen() when mbtowc or wcwidth
2016         not available (or not using NLS).
2017         * utils.c: Ensure we use single-byte separators when not doing
2018         NLS progress-bars.
2019         * wget.h: Determine whether to use NLS for progress-bars, based
2020         on whether wcwidth and mbtowc are available.
2021
2022 2008-02-03  Micah Cowan  <micah@cowan.name>
2023
2024         * progress.c (create_image): Use number of characters/columns
2025         consumed, rather than number of bytes, to determine how much of
2026         a line we've used. Fixes assertion errors and field alignment
2027         bugs (#22161, #20481)
2028         (get_eta, count_cols): Added to support the changes for
2029         create_image.
2030         * http.c (http_loop): Put no-clobber logic back into http_loop,
2031         before starting to fetch, for when we're not doing
2032         content-disposition.
2033
2034 2008-01-31  Micah Cowan  <micah@cowan.name>
2035
2036         * http.c (gethttp): Don't derive hs->contlen from possibly
2037         invalid/missing Content-Length; instead, get the appropriate
2038         value from the Content-Range header values.
2039         (parse_content_range): Handle '*' instance-length field.
2040
2041 2008-01-25  Micah Cowan  <micah@cowan.name>
2042
2043         * main.c: Added notes to translators regarding (C), diacritics
2044         in names.
2045         * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
2046         cookies.c, cookies.h, ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c,
2047         ftp.h, gen-md5.c, gen-md5.h, gnutls.c, hash.c, hash.h, host.c,
2048         host.h, html-parse.c, html-parse.h, html-url.c, http-ntlm.c,
2049         http-ntlm.h, http.c, http.h, init.c, init.h, log.c, log.h,
2050         main.c, mswindows.c, mswindows.h, netrc.c, netrc.h, openssl.c,
2051         options.h, progress.c, progress.h, ptimer.c, ptimer.h, recur.c,
2052         recur.h, res.c, res.h, retr.c, retr.h, spider.c, spider.h,
2053         ssl.h, sysdep.h, test.c, test.h, url.c, url.h, utils.c,
2054         utils.h, wget.h, xmalloc.c, xmalloc.h: Updated copyright year.
2055
2056 2007-12-10  Micah Cowan  <micah@cowan.name>
2057
2058         * main.c: The option is --content-disposition, not
2059         --no-content-disposition (at the moment).
2060
2061 2007-12-08  Hrvoje Niksic  <hniksic@xemacs.org>
2062
2063         * ftp.c (ftp_retrieve_glob): Print both arguments of fnmatch in
2064         fnmatch error message.
2065         (ftp_retrieve_glob): Don't match with fnmatch if we're only
2066         supposed to get one file.
2067
2068 2007-12-07  Micah Cowan  <micah@cowan.name>
2069
2070         * Makefile.am: Plug in vars to include stuff from
2071         $(top_srcdir)/md5 when appropriate.
2072
2073 2007-12-05  Micah Cowan  <micah@cowan.name>
2074
2075         * utils.c (subdir_p): Handle the case where d1 is "".
2076         * convert.c (convert_all_links): Don't return without
2077         deallocating timer.
2078
2079 2007-11-28  Micah Cowan  <micah@cowan.name>
2080
2081         * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
2082         convert.h, cookies.c, cookies.h, ftp-basic.c, ftp-ls.c,
2083         ftp-opie.c, ftp.c, ftp.h, gen-md5.c, gen-md5.h, gnutls.c,
2084         hash.c, hash.h, host.c, host.h, html-parse.c, html-parse.h,
2085         html-url.c, http-ntlm.c, http-ntlm.h, http.c, http.h, init.c,
2086         init.h, log.c, log.h, main.c, mswindows.c, mswindows.h,
2087         netrc.c, netrc.h, openssl.c, options.h, progress.c, progress.h,
2088         ptimer.c, ptimer.h, recur.c, recur.h, res.c, res.h, retr.c,
2089         retr.h, safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h,
2090         sysdep.h, test.c, test.h, url.c, url.h, utils.c, utils.h,
2091         wget.h, xmalloc.c, xmalloc.h: Updated license exception for
2092         OpenSSL, per the SFLC.
2093
2094 2007-10-30  Micah Cowan  <micah@cowan.name>
2095
2096         * main.c (main): Declare argv parameter as char **argv, rather
2097         than char *const *argv. This fixes usage of getopt_long,
2098         regardless of whether getopt_long has a constified argv or not.
2099
2100 2007-10-22  Gisle Vanem  <gvanem@broadpark.no>
2101
2102         * mswindows.c: Move INHIBIT_WRAP macro definition up with wget.h
2103         inclusion.
2104
2105 2007-10-18  Steven Schweda  <sms@antinode.org>
2106
2107         * sysdep.h: #include <stdint.h> as well as <inttypes.h>, to work
2108         around a glitch on Tru64 systems.
2109
2110 2007-10-18  Micah Cowan  <micah@cowan.name>
2111
2112         * Makefile.am: version.c should not be distributed. Removed
2113         config-post.h. Add version.c dependency and gnulib include path
2114         for libunittest.a.
2115         * sysdep.h: Got contents of config-post.h
2116         * config-post.h: Removed.
2117         * wget.h: #include "config.h".
2118         * alloca.c, cmpt.c, connect.c, convert.c, cookies.c,
2119         ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, gen-md5.c, gnutls.c,
2120         hash.c, host.c, html-parse.c, html-url.c, http-ntlm.c, http.c,
2121         init.c, log.c, main.c, mswindows.c, netrc.c, openssl.c,
2122         progress.c, ptimer.c, recur.c, res.c, retr.c, spider.c, url.c,
2123         utils.c, xmalloc.c: Use wget.h at very top, and instead of
2124         config.h.
2125
2126 2007-10-15  Micah Cowan  <micah@cowan.name>
2127
2128         * Makefile.am: Remove intermediary hg-id file generation, make
2129         version.c-generation more portable.
2130
2131 2007-10-14  Micah Cowan  <micah@cowan.name>
2132
2133         * cmpt.c, cookies.c, ftp-basic.c, ftp-ls.c, ftp.c, hash.c,
2134         host.c, html-parse.c, html-url.c, http-ntlm.c, http.c, init.c,
2135         log.c, main.c, netrc.c, openssl.c, res.c, url.c, utils.c,
2136         wget.h: Replace uses of ISSPACE, etc with c_isspace, etc.
2137         * gnu-md5.c, gnu-md5.h: Removed, in deference to gnulib.
2138         * Makefile.am: Removed gnu-md5.h from wget_SOURCES.
2139         * gen-md5.c: Changed #inclusion of gnu-md5.h to md5.h (gnulib's).
2140         * recur.c (download_child_p): Print error if unlink of
2141         robots.txt fails.
2142         * main.c (main): --spider or --delete-after now implies
2143         --no-directories (thanks, Josh Williams).
2144
2145 2007-10-14  Joshua David Williams  <yurimxpxman@gmail.com>
2146
2147         * recur.c (download_child_p): Remove robots.txt if
2148         --delete-after or --spider is on.
2149
2150 2007-10-13  Micah Cowan  <micah@cowan.name>
2151
2152         * Makefile.am: Make version.c depend on Wget dependencies (source
2153         files, plus such things as LIBOBJS so we get things like
2154         http-ntlm.c). Removed getopt.[ch], as we're now using gnulib for
2155         these.
2156
2157 2007-10-10  Micah Cowan  <micah@cowan.name>
2158
2159         * http-ntlm.c: Include openssl/opensslv.h explicitly, instead of
2160         hoping it'll be included by accident in openssl/des.h.
2161
2162 2007-10-09  Gisle Vanem  <gvanem@broadpark.no>
2163
2164         * mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer
2165         needed.  Hence simply the prototype. Free 'exec_name' at exit.
2166
2167 2007-10-09  Micah Cowan  <micah@cowan.name>
2168
2169         * gettext.h: Imported from /usr/share/gettext, fuller handling
2170         of --disable-nls.
2171         * wget.h: Remove logic for handling lack of NLS (now in
2172         gettext.h).
2173         * main.c: Use gettext's ENABLE_NLS rather than HAVE_NLS.
2174         * Makefile.am: added @LIBINTL@ to LIBS (though it probably
2175         belongs in LDADD, along with everything else currently assigned
2176         to LIBS).
2177
2178 2007-10-08  Micah Cowan  <micah@cowan.name>
2179
2180         * http.c (http_loop): Add send_head_first conditional back
2181         around code that needs it, but not around the last-modified
2182         header-parsing stuff this time. Removed no-longer-useful (was it
2183         ever?) restart_loop boolean, continuing unconditionally at end
2184         of send_head_first conditional block (if we haven't jumped out).
2185
2186 2007-10-04  Micah Cowan  <micah@cowan.name>
2187
2188         * http.c (http_loop): We've got_name if content_disposition
2189         support isn't on; make sure we continue properly in that case,
2190         even though we're not sending HEAD.
2191         * Makefile.in: Removed, replaced by Makefile.am.
2192         * Makefile.am: Converted from Makefile.in.
2193
2194 2007-10-02  Gisle Vanem  <gvanem@broadpark.no>
2195
2196         * ftp.c: Use "_listing" for MSDOS (".listing" is illegal).
2197
2198         * url.c: Update comment for 'filechr_not_windows'.
2199
2200         * utils.c: Include <process.h> for 'getpid()' on Watcom.
2201
2202 2007-10-02  Micah Cowan  <micah@cowan.name>
2203
2204         * ftp.c (getftp, ftp_loop_internal), http.c (http_loop), main
2205         (main): Use datetime_str instead of time_str, for those who have
2206         potentially long-running sessions. Based on suggestions by Saso
2207         Tomat <miskox@hotmail.com> and Steven M. Schweda
2208         <sms@antinode.org>.
2209         * http.c (gethttp): Warn about host lookup failures. Adjusted
2210         from Stephen Gildea's patch.
2211
2212 2007-10-02  Stephen Gildea  <stepheng+wget@gildea.com>
2213
2214         * connect.c (connect_to_host): Warn about host lookup failures.
2215
2216 2007-09-25  Micah Cowan  <micah@cowan.name>
2217
2218         * Makefile.in: Use EXEEXT instead of exeext.
2219
2220 2007-09-24  Gisle Vanem  <giva@bgnett.no>
2221
2222         * connect.c, init.c, main.c, openssl.c, options.h, sysdep.h,
2223         url.c, utils.c: Added support for building on MS-DOS.
2224
2225 2007-09-24  Jochen Roderburg  <roderburg@uni-koeln.de>
2226
2227         * http.c (http_zero): Remove no-longer-used local_size variable.
2228         Fixes bug #21057.
2229
2230 2007-09-12  Micah Cowan  <micah@cowan.name>
2231
2232         * http.c (http_loop): Remove send_head_first from condition for
2233         parsing timestamp.
2234
2235 2007-08-29  Micah Cowan  <micah@cowan.name>
2236
2237         * openssl.c (ssl_init): Re un-const-ified the meth local
2238         variable, to match current versions of openssl.
2239         * spider.c: Removed visited_url function, as it may be very
2240         inefficient.
2241         (print_broken_links): Removed traversal of referrers, until such
2242         time as a more efficient implementation can be written.
2243         * spider.h: Replaced declaration of visited_url with an
2244         empty-bodied, function-like macro.
2245
2246 2007-08-27  Gisle Vanem  <giva@bgnett.no>
2247
2248         * mswindows.c (run_with_timeout): Ensure that the correct
2249         conversion specification is used for the return result of
2250         the GetLastError function.
2251         * getopt.c: Fix missing (but, accidentally, legal) comment
2252         delimiter after licensing text.
2253         * recur.c (retrieve_tree): Inserted missing cast for strip_auth.
2254         Includes adjustment by Ralf Wildenhues.
2255         * openssl.c (ssl_init): const-ified the meth local variable.
2256         * main.c: Include all the static function definitions in the
2257         "#ifndef TESTING" clause, leaving just the definitions for
2258         exec_name (not set), and opt.
2259         * utils.c (run_with_timeout): Now returns bool, to align with
2260         declaration in utils.h.
2261
2262 2007-08-27  Micah Cowan  <micah@cowan.name>
2263
2264         * wget.h: Added macro replacement for ngettext, for environs
2265         that lack NLS.
2266
2267 2007-08-26  Micah Cowan  <micah@cowan.name>
2268
2269         * spider.c (print_broken_links): Fixed incorrect plurals msgid
2270         usage, switched to use ngettext function.
2271
2272 2007-08-24  Micah Cowan  <micah@cowan.name>
2273
2274         * http.c (http_loop): Introduced time_came_from_head boolean
2275         flag, to help avoid parsing the same Last-Modified header twice.
2276         Replaced spidering returns of RETRUNNEEDED for some situations,
2277         to RETROK, as otherwise it will be interpreted as an error.
2278         RETRUNNEEDED appears never to be referenced outside of
2279         http.c (and wget.h), and, when returned by gethttp, is
2280         translated by http_loop to RETROK.
2281         * url.c (are_urls_equal): Don't call getchar_from_escaped_string
2282         if u2 is shorter than u1.
2283         (getchar_from_escaped_string): Don't decode reserved characters.
2284         Handle illegally appearing '%'s as literal '%'s. Ensure hex
2285         digits before attempting to decode.
2286         (test_are_urls_equal): Added tests to handle u2 shorter than u1,
2287         and %2f not treated the same as /.
2288         * spider.c (in_url_list_p): Don't call are_urls_equal if one of
2289         them is NULL.
2290
2291 2007-08-23  Joshua David Williams  <yurimxpxman@gmail.com>
2292
2293         * spider.c (in_url_list_p): Removed the bool verbose argument
2294
2295 2007-08-22  Mauro Tortonesi  <mauro@ferrara.linux.it>
2296
2297         * http.c (http_loop): Fall back to GET if HEAD fails with a 500 or 501
2298         error code.
2299
2300 2007-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
2301
2302         * http.c (http_loop): Send preliminary HEAD request if -N is given and
2303         the destination file exists already.
2304
2305 2007-08-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
2306
2307         * http.c (http_loop): Fixed HTTP HEAD requests logic when --spider is
2308         given.
2309
2310 2007-08-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2311
2312         * url.c (append_uri_pathel): Do not assume dest string to be
2313         zero-terminated.
2314         (test_append_uri_pathel): Terminate string to fix test failure.
2315
2316 2007-08-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2317
2318         * url.c (url_string): Use comparison, not assignment, in
2319         check for auth_mode == URL_AUTH_HIDE_PASSWD.
2320
2321 2007-08-09  Micah Cowan  <micah@cowan.name>
2322
2323         * http.c (http_loop): If we got a HEAD and then a GET, and the
2324         GET had a timestamp, use that one, not any we may have gotten
2325         from the HEAD.
2326
2327 2007-08-08  Micah Cowan  <micah@cowan.name>
2328
2329         * init.c (defaults): Content disposition will not be default,
2330         since it currently results in extra round-trips.
2331
2332 2007-07-31  Micah Cowan  <micah@cowan.name>
2333
2334         * http.c (gethttp): Set contlen = -1 when we encounter a
2335         negative-valued Content-Length header, so we don't consider it
2336         an internal error later on and call abort().
2337
2338 2007-07-29  Micah Cowan  <micah@cowan.name>
2339
2340         * url.h, url.c (url_string): Replaced bool arg of the url_string
2341         function with enum url_auth_mode, with added option to
2342         completely remove user/pass auth information.
2343         * http.c, ftp.c, url.c, recur.c: Adapted call to url_string
2344         function to fit new usage.
2345         * recur.c (retrieve_tree): Remove auth info from Referer header.
2346
2347 2007-07-28  Micah Cowan  <micah@cowan.name>
2348
2349         * options.h, init.c, retr.c, main.c: renamed opt maxredirect
2350         field to max_redirect, for improved consistency.
2351         * init.c: changed max_redirect parser from cmd_number_inf to
2352         cmd_number, as infinite redirects may not be appropriate.
2353         Alternatively, if cmd_number_inf should be used, then
2354         opt.max_redirect's value should be checked a bit differently in
2355         retr.c, to allow for the "infinite" meaning of zero.
2356
2357 2007-07-25  Micah Cowan  <micah@cowan.name>
2358
2359         * http.c (create_authorization_line)
2360         (basic_authentication_encode, known_authentication_scheme_p)
2361         (load_cookies): Moved declarations up.
2362         (basic_authed_hosts): Added. Tracks what hosts have issued Basic
2363         challenge and been given the global username, password.
2364         (maybe_send_basic_creds): Added. Sends Basic creds for hosts that
2365         have issued Basic challenges.
2366         (register_basic_auth_host): Added. Instantiates
2367         basic_authed_hosts if necessary, then registers the host that
2368         has issued a challenge.
2369         (gethttp) <auth>: Only send authentication credentials after
2370         we've received a challenge from that host. This is a stop-gap
2371         fix until a proper fix can be implemented; still isn't quite
2372         right, as we should only be sending credentials automatically
2373         for authenticated paths and below, and not for the entire host.
2374
2375 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
2376
2377         * options.h: added maxredirect to options struct
2378         * init.c: added maxredirect to list of variables
2379         * retr.c (retrieve_url): replaced MAX_REDIRECTIONS with opt.maxredirect
2380         * main.c: added option --max-redirect
2381
2382 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
2383
2384         * test.h: tests made more verbose; now displays the name
2385         of each test run.
2386
2387 2007-07-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
2388
2389         * http.c (http_loop): Fixed the HTTP requests logic. Now it skips the
2390         preliminary HEAD request if either -O or --no-content-disposition are
2391         given, and neither --spider and -N are given.
2392
2393 2007-07-05  Micah Cowan  <micah@cowan.name>
2394
2395         * cmpt.c, connect.c, connect.h, convert.c, convert.h:
2396         * cookies.c, cookies.h, ftp-basic.c, ftp.c, ftp.h, ftp-ls.c:
2397         * ftp-opie.c, gen-md5.c, gen-md5.h, getopt.c, getopt.h, gnu-md5.c:
2398         * gnu-md5.h, gnutls.c, hash.c, hash.h, host.c, host.h:
2399         * html-parse.c, html-parse.h, html-url.c, http.c, http.h:
2400         * http-ntlm.c, http-ntlm.h, init.c, init.h, log.c, log.h, main.c:
2401         * Makefile.in, mswindows.c, mswindows.h, netrc.c, netrc.h:
2402         * openssl.c, options.h, progress.c, progress.h, ptimer.c:
2403         * ptimer.h, recur.c, recur.h, res.c, res.h, retr.c, retr.h:
2404         * safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h, sysdep.h:
2405         * test.c, test.h, url.c, url.h, utils.c, utils.h, wget.h:
2406         * xmalloc.c, xmalloc.h:
2407         Updated GPL reference to version 3 or later, removed FSF
2408         address.
2409
2410 2007-07-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
2411
2412         * http.c (http_loop): Skip HEAD request and start immediately with GET
2413         if -O is given.
2414
2415 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
2416
2417         * http.c (print_server_response): Escape non-printable characters
2418         in server respone.
2419
2420 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
2421
2422         * netrc.c: Don't make netrc_list static, as it prevents
2423         compilation with DEBUG_MALLOC.
2424
2425         * utils.c (aprintf): Don't use vasprintf when DEBUG_MALLOC is
2426         requested because, in that case, we want the calls to malloc to be
2427         coming from us.
2428
2429 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
2430
2431         * cookies.c (parse_set_cookie): Would erroneously discard cookies
2432         with unparsable expiry time.
2433
2434 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
2435
2436         * progress.c (create_image): Check for ETA overflow.
2437         (print_row_stats): Ditto.
2438
2439 2007-01-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
2440
2441         * init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc
2442         warning about strict-aliasing violation.
2443
2444 2007-01-09  Steven M. Schweda  <sms@antinode.org>
2445
2446         * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.
2447
2448 2006-12-29  Gisle Vanem  <giva@bgnett.no>
2449
2450         * mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
2451
2452 2006-12-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
2453
2454         * http.c (parse_content_disposition): Consider directory prefix, if
2455         specified.
2456
2457 2006-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
2458
2459         * retr.c (retrieve_from_file): Ditto.
2460         (url_uses_proxy): New function.
2461
2462         * main.c (main): Don't check for opt.use_proxy when deciding
2463         whether to call retrieve_url or retrieve_tree; check whether the
2464         proxy would be used for *this* URL.
2465
2466 2006-10-17  Mike Grant  <mggr@pml.ac.uk>
2467
2468         * ftp.c (ftp_loop_internal): Would incorrectly skip changing
2469         working directory when retrying after a failed FTP attempt.
2470         Originally reported by Nate Eldredge.
2471
2472 2006-10-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
2473
2474         * convert.c (downloaded_file): Fixed bug which used to break -E -k -K
2475         mode.
2476
2477 2006-08-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
2478
2479         * http.c: #include'd spider.h to get rid of compiler warnings.
2480
2481         * main.c: Ditto.
2482
2483         * recur.c: Ditto.
2484
2485 2006-08-24  Mauro Tortonesi  <mauro@ferrara.linux.it>
2486
2487         * Makefile.in: Added spider.c to the list of files to compile and
2488         spider.h to the list of header files. Updated copyright information.
2489
2490         * http.c: Major changes to recursive spider mode. Now for every
2491         resource we are supposed to check, we send a HEAD request to find out
2492         if it exists. If the resource is a HTML file, we retrieve it and parse
2493         it to discover links to other resources.
2494
2495         * recur.c: Ditto.
2496
2497         * res.c (res_retrieve_file): Disable opt.timestamping and opt.spider
2498         when retrieving robots.txt. Updated copyright information.
2499
2500         * convert.c: Moved code tracking broken links to spider.c.
2501
2502         * convert.h: Ditto.
2503
2504         * spider.c: Created new file to keep track of visited URLs in spider
2505         mode.
2506
2507         * spider.h: Ditto.
2508
2509 2006-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
2510
2511         * http.c: Fixed timestamping-related bug.
2512
2513 2006-08-16  Mauro Tortonesi  <mauro@ferrara.linux.it>
2514
2515         * http.c: Fixed bug which broke --continue feature. Now if -c is
2516         given, http_loop sends a HEAD request to find out the destination
2517         filename before resuming download.
2518
2519 2006-08-08  Hrvoje Niksic  <hniksic@xemacs.org>
2520
2521         * utils.c (datetime_str): Avoid code repetition with time_str.
2522
2523 2006-07-21  Hrvoje Niksic  <hniksic@xemacs.org>
2524
2525         * init.c (commands): Correctly place "contentdisposition".
2526
2527 2006-07-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
2528
2529         * sysdep.h: If intptr_t isn't defined, simply typedef it to long.
2530
2531         * http.c: Added explicit cast to int in logprintf call to remove
2532         compiler warnings on 64-bit platforms.
2533
2534         * connect.c: Added a few casts to intptr_t to remove compiler warnings
2535         on 64-bit platforms.
2536
2537         * main.c: Disable -r, -p and -N when -O is used. Disable -k when -O is
2538         used and multiple URLs are given. Update maintainer information.
2539
2540         * all: Update copyright information.
2541
2542 2006-07-10  KJKHyperion  <hackbunny@reactos.com>
2543
2544         * url.c (filechr_table): Mark DEL (0x7f) as a control character
2545         and | as a character Windows can't handle.
2546
2547 2006-06-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
2548
2549         * res.c: Implemented is_robots_txt_url function for detection of
2550         robots.txt URLs and related test routine.
2551
2552         * res.h: Ditto.
2553
2554         * url.c: Implemented are_urls_equal function for URL comparison and
2555         related testing routine.
2556
2557         * url.h: Ditto.
2558
2559         * convert.c: Fixes for recursive spider mode: don't consider
2560         non-existing robots.txt as a broken link, and use are_urls_equal
2561         instead of strcasecmp for referrer URLs comparison.
2562
2563         * test.c: Call tests routines for are_urls_equal and
2564         is_robots_txt_url.
2565
2566 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2567
2568         * wget.h (wgint): Typedef to any 64-bit (or larger) type we can
2569         find, not necessarily off_t or long.
2570
2571 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2572
2573         * cmpt.c (strtoll): Check for overflow and underflow without
2574         relying on (technically) undefined behavior.  Don't assume that
2575         strtoll_type is 64 bits wide.
2576
2577 2006-06-21  Hrvoje Niksic  <hniksic@xemacs.org>
2578
2579         * utils.c (base64_encode): Cast void pointer to char * before
2580         doing arithmetic.
2581
2582 2006-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2583
2584         * utils.c (base64_encode): Made TBL const.
2585         (base64_decode): Made the base64_char_to_value table const.
2586
2587 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
2588
2589         * utils.c (base64_encode): Made the DATA pointer void * so the
2590         callers can pass it any kind of pointer (including both signed and
2591         unsigned char pointers).
2592         (base64_decode): Ditto for DEST.
2593
2594 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
2595
2596         * utils.c (base64_encode): Would read past end of STR.
2597         Reported by rick@eckle.org.
2598
2599 2006-06-13  Mauro Tortonesi  <mauro@ferrara.linux.it>
2600
2601         * options.h (struct options): Introduced member restrict_files_case to
2602         keep track of preferences on character case restrictions for
2603         filenames.
2604
2605         * init.c: Modified defaults and cmd_spec_restrict_file_names to
2606         support character case restrictions for filenames. Added
2607         test_cmd_spec_restrict_file_names unit test.
2608
2609         * url.c: Modified append_uri_pathel to support character case
2610         restrictions for filenames. Added test_append_uri_pathel unit test.
2611
2612         * test.c: Added test_cmd_spec_restrict_file_names and
2613         test_append_uri_pathel to the list of unit tests to run.
2614
2615 2006-06-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
2616
2617         * retr.c (retrieve_from_file): Use retrieve_tree and automatically
2618         turn on opt.follow_ftp in case of recursive FTP retrieval through HTTP
2619         proxy.
2620
2621         * main.c: Automatically turn on opt.follow_ftp in case of recursive
2622         FTP retrieval through HTTP proxy.
2623
2624 2006-06-12  Tony Lewis  <tlewis@exelana.com>
2625
2626         * main.c: Improved CHEN Peng's patch by proposing a simpler logic.
2627
2628 2006-06-12  CHEN Peng  <chenpeng@alumni.nus.edu.sg>
2629
2630         * main.c: Use retrieve_tree in case of recursive FTP retrieval through
2631         HTTP proxy.
2632
2633 2006-05-25  Mauro Tortonesi  <mauro@ferrara.linux.it>
2634
2635         * convert.c: Added mechanisms to keep track broken links.
2636
2637         * convert.h: Ditto.
2638
2639         * wget.h: Reordered and enumerated uerr_t constants.
2640
2641         * recur.c: Fixes to support recursive spider mode.
2642
2643         * http.c: Ditto.
2644
2645         * main.c: Print broken links in case of recursive spider mode.
2646
2647         * retr.c: Changed interface of retrieve_url.
2648
2649         * retr.h: Ditto.
2650
2651         * ftp.c: Changed interface of ftp_loop.
2652
2653         * ftp.h: Ditto.
2654
2655         * res.c: Minor change to reflect changes in interface of retrieve_url.
2656
2657 2006-05-18  Lawrence Jones  <lawrence.jones@ugs.com>
2658
2659         * ftp-ls.c (ftp_parse_unix_ls): Correct size parsing, add size
2660         and filename debugging output.
2661
2662 2006-04-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
2663
2664         * http.c: If Content-Disposition header is present, allow unique
2665         filename generation unless -nc is given. Permit to disable parsing of
2666         Content-Disposition header.
2667
2668         * options.h: Added option --no-content-disposition to disable parsing
2669         of HTTP Content-Disposition header.
2670
2671         * init.c: Ditto.
2672
2673         * main.c: Ditto.
2674
2675 2006-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
2676
2677         * hash.c (TOLOWER): Wrap macro arg in parentheses.
2678
2679 2006-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
2680
2681         * http.c (parse_content_disposition): Doc fix.
2682
2683 2006-03-15  Mauro Tortonesi  <mauro@ferrara.linux.it>
2684
2685         * utils.c: Restricted operational semantics of frontcmp and proclist
2686         from generic strings to directory names and them to subdir_p and
2687         dir_matches_p respectively.  Applied George Ogata's one line patch to
2688         restrict algorithm of subdir_p to full directory name matching.  Added
2689         testcases for subdir_p and dir_matches_p.
2690
2691         * utils.h: Changed all frontcmp occurrences to subdir_p.
2692
2693         * recur.c: Ditto.
2694
2695         * test.c: Changed type returned by test functions from char * to const
2696         char *.  Added test_subdir_p and test_dir_matches_p to the list of
2697         tests to run.
2698
2699         * http.c (test_parse_content_disposition): Changed return type from
2700         char * to const char *.
2701
2702 2006-03-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
2703
2704         * recur.c (struct queue_element): Changed type of html_allowed member
2705         to bool.
2706
2707 2006-03-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
2708
2709         * ftp.c (ftp_list): Try `LIST -a' command first and revert to `LIST'
2710         in case of failure.
2711
2712 2006-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
2713
2714         * hash.c (TOLOWER): Fix definition when STANDALONE.
2715         Reported by Beni Serfaty.
2716
2717 2006-03-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
2718
2719         * http.c (http_loop): Fixed recursive HTTP retrieval.
2720
2721 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
2722
2723         * http.c (extract_param): Declare extern so it can be used from
2724         other files.
2725         (extract_param): Return error for empty name.
2726
2727 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
2728
2729         * url.c (find_last_char): Define in terms of memrchr.
2730
2731         * cmpt.c (memrchr): Define it on systems that don't have it.
2732
2733         * http.c (extract_param): New function for parsing header values
2734         with parameters.
2735         (parse_content_disposition): Use it.  Don't allow slashes and
2736         backslashes in the file name.
2737
2738 2006-02-27  Hrvoje Niksic  <hniksic@xemacs.org>
2739
2740         * url.c (path_simplify): Don't preserve ".." at beginning of path.
2741         Suggested by Frank McCown.
2742
2743 2006-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
2744
2745         * http.c (gethttp): Only use FILE.N.html if FILE.html exists.
2746
2747 2006-02-09  Hrvoje Niksic  <hniksic@xemacs.org>
2748
2749         * mswindows.c (run_with_timeout): Made thread_hnd non-static.
2750
2751 2006-02-05  Hrvoje Niksic  <hniksic@xemacs.org>
2752
2753         * retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of
2754         the specified wait period.
2755
2756 2006-02-03  Hrvoje Niksic  <hniksic@xemacs.org>
2757
2758         * utils.c (number_to_string): Don't use sprintf for printing
2759         WGINT_MIN; simply divide n by 10 and defer printing the last
2760         digit.
2761         (number_to_string): Removed the SPRINTF_WGINT macro.
2762
2763 2006-02-03  Mauro Tortonesi  <mauro@ferrara.linux.it>
2764
2765         * http.c: Fixed support for Content-Disposition header.
2766
2767         * test.c: Added test_parse_content_disposition to the list of unit
2768         tests to run.
2769
2770 2006-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
2771
2772         * hash.c: Don't define countof if it's already defined.
2773
2774         * hash.c: Obtain the definition of uintptr_t when standalone.
2775
2776 2006-01-30  Mauro Tortonesi  <mauro@ferrara.linux.it>
2777
2778         * http.c: Changed output format. Removed excessively verbose debugging
2779         output.
2780
2781 2005-12-07  Mauro Tortonesi  <mauro@ferrara.linux.it>
2782
2783         * http.c: Fixed pre-download verbose output which was broken by
2784         HTTP code refactoring.
2785
2786 2005-11-23  Mauro Tortonesi  <mauro@ferrara.linux.it>
2787
2788         * http.c: Refactored HTTP code.  If -O is not used, the new code
2789         delays the choice of the file name where the downloaded resource
2790         will be saved until the HTTP headers have been retrieved.
2791         Added support for Content-Disposition header.
2792
2793 2005-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
2794
2795         * hash.c (INVALID_PTR): Use uintptr_t instead of unsigned long.
2796         (hash_pointer): Don't assume a pointer fits in `unsigned long'.
2797
2798 2005-11-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
2799
2800         * Makefile.in: Removed support for unit testing (now it is in
2801         tests/Makefile.in).
2802
2803 2005-10-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
2804
2805         * Makefile.in: Added basic support for unit testing.
2806
2807         * test.c: Ditto.
2808
2809         * test.h: Ditto.
2810
2811 2005-10-13  Daniel Stenberg  <daniel@haxx.se>
2812
2813         * http-ntlm.c (ntlm_output): Fixed buffer overflow vulnerability.
2814
2815 2005-10-09  Russ Allbery  <rra@stanford.edu>
2816
2817         * snprintf.c: Remove round to round_int and pow10 to pow10_int, to
2818         avoid warnings from GCC 4.0.
2819
2820 2005-10-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
2821
2822         * retr.c: Changed semantics of no_proxy_match.
2823
2824 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
2825
2826         * main.c (main): Don't print the summary if nothing has been downloaded.
2827
2828 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
2829
2830         * retr.c (retr_rate): Rename parameter from MSECS to SECS since it
2831         no longer holds milliseconds.
2832
2833 2005-09-01  Hrvoje Niksic  <hniksic@xemacs.org>
2834
2835         * progress.c: Introduce symbolic constants for "magic" values of
2836         0.2 and 0.9, REFRESH_INTERVAL and ETA_REFRESH_INTERVAL.
2837
2838 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
2839
2840         * cmpt.c (strtoll): Correctly handle strtoll("0x", ptr, 0) and
2841         strtoll("0x<nonhexchar>", ptr, 0) -- in both cases *ptr must be
2842         set to the position of 'x', not after it.
2843
2844 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
2845
2846         * hash.c (hash_table_map): Rename to hash_table_for_each and
2847         update callers.
2848         Document the meaning of the callback's return value.
2849         (hash_table_iterate): New function.
2850         (hash_table_iter_next): Likewise.
2851         Update most places that used hash_table_for_each to use the
2852         iteration, which doesn't require a temporary function with
2853         explicit state management.
2854
2855 2005-08-26  Albert Chin  <wget@mlists.thewrittenword.com>
2856
2857         * Makefile.in: Use @datadir@.  Define localedir as $(datadir)/locale.
2858
2859 2005-08-26  Jeremy Shapiro  <jnshapiro@gmail.com>
2860
2861         * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY.
2862
2863 2005-08-23  Hrvoje Niksic  <hniksic@xemacs.org>
2864
2865         * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA.
2866
2867 2005-08-12  Hrvoje Niksic  <hniksic@xemacs.org>
2868
2869         * wget.h: Renamed strtoll_return to strtoll_type.
2870
2871 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
2872
2873         * progress.c (eta_to_human_short): Switch to days when printing
2874         more than 48h rather than 100h.  (It's not immediately apparent
2875         how many days there are in 83h.)
2876
2877 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
2878
2879         * cmpt.c (strtoll): Define it if missing on the system and if Wget
2880         needs it.
2881
2882         * mswindows.c (str_to_int64): Move to cmpt.c and rename to strtoll.
2883
2884 2005-08-10  Hrvoje Niksic  <hniksic@xemacs.org>
2885
2886         * host.c (print_address): Always use inet_ntop when IPv6 is
2887         enabled.
2888
2889         * host.h (ip_address): Simplify the data union.
2890
2891 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
2892
2893         * mswindows.c (inet_ntop): Also handle IPv4 addresses for
2894         completeness.
2895
2896 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
2897
2898         * http.c (gethttp): Don't read more than the amount of data
2899         specified by the content-length header.
2900
2901 2005-08-09  Vasil Dimov  <vd@datamax.bg>
2902
2903         * ftp.c (getftp): Don't free RESPLINE if ftp_response returns a
2904         status other than FTPOK.
2905
2906 2005-08-04  Giuseppe Bonacci  <g.bonacci@libero.it>
2907
2908         * ftp-ls.c (ftp_parse_unix_ls): Remember the position of the
2909         previous token instead of backtracking back to it.
2910
2911 2005-07-08  Gisle Vanem  <giva@bgnett.no>
2912
2913         * mswindows.h: Include process.h to get getpid() declaration.
2914
2915 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
2916
2917         * utils.c (aprintf): Use vasprintf where available.
2918
2919 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
2920
2921         * url.c (rewrite_shorthand_url): Simplify code using aprintf and
2922         strspn.
2923
2924 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
2925
2926         * gnutls.c (ssl_check_certificate): Check for the validity of the
2927         presented X509 certificate.
2928
2929 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
2930
2931         * openssl.c (ssl_check_certificate): Print custom error messages
2932         for frequent X509 certificate problems.
2933
2934 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
2935
2936         * mswindows.h: Define an alias for stat and fstat, as requested by
2937         config-compiler.h.
2938         (gai_strerror): Define to windows_strerror if NEED_GAI_STRERROR is
2939         defined.
2940
2941 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
2942
2943         * mswindows.h: Use strtoll where available.
2944
2945 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
2946
2947         * sysdep.h: Add a full declaration of fnmatch.h.
2948
2949 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
2950
2951         * utils.c: Unconditionally include <setjmp.h>.
2952
2953 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
2954
2955         * utils.c (fnmatch_nocase): New function.
2956         (proclist): Use it instead of fnmatch when opt.ignore_case is
2957         requested.
2958         (in_acclist): Respect opt.ignore_case.
2959         (frontcmp): Respect opt.ignore_case.
2960
2961         * options.h (struct options): New flag opt.ignore_case.
2962
2963 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
2964
2965         * ptimer.c: Measure time in seconds rather than milliseconds.
2966         Adjusted all callers.
2967
2968 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
2969
2970         * http.c (gethttp): When freeing MESSAGE, take into account that
2971         it can be NULL.
2972
2973 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
2974
2975         * cmpt.c (timegm): Handle years after 2099.
2976
2977 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
2978
2979         * cmpt.c (timegm): Remove unused variable.
2980
2981 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
2982
2983         * cmpt.c (timegm): Don't call mktime; simply count the seconds
2984         between 1970-01-01 and the specified date.
2985
2986 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
2987
2988         * wget.h (or): Define HAVE_SSL when either HAVE_OPENSSL or
2989         HAVE_GNUTLS are defined.
2990
2991         * gnutls.c: New file.
2992
2993 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
2994
2995         * http.c (gethttp): Don't print the request write error message
2996         twice.
2997
2998 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
2999
3000         * openssl.c (openssl_errstr): Instead of always using a large
3001         static buffer, only allocate the error string when there is an
3002         actual error.
3003
3004 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
3005
3006         * xmalloc.c (debugging_free): Prefix hex pointer value with "0x"
3007         when printing.
3008
3009 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
3010
3011         * utils.c (NEXT_BASE64_CHAR): Rename to NEXT_CHAR and simplify to
3012         get the next non-whitespace character.
3013
3014 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
3015
3016         * utils.c (base64_decode): Don't silently tolerate non-base64
3017         non-white-space characters in the base64 stream.
3018
3019 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
3020
3021         * connect.c (LAZY_RETRIEVE_INFO): Make last_tick unsigned to match
3022         transport_map_modified_tick.
3023
3024 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
3025
3026         * config-post.h (alloca): Updated declaration to not enumerate all
3027         Windows compilers.
3028
3029 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
3030
3031         * openssl.c (openssl_errstr): Separate error messages with "; ".
3032
3033 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
3034
3035         * ftp.c (getftp): Ditto.
3036
3037         * http.c (gethttp): Use fd_errstr.
3038
3039         * connect.c (fd_register_transport): Restructure parameters to
3040         include only a single structure that describes transport
3041         implementation.
3042
3043         * openssl.c (openssl_errstr): New function: dump SSL error strings
3044         into a static buffer and return a pointer to the buffer.
3045
3046         * connect.c (fd_errstr): New function; returns transport-specific
3047         error message, or strerror(errno) if transport doesn't supply one.
3048
3049 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
3050
3051         * mswindows.h: Also wrap accept() and listen().
3052
3053 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
3054
3055         * url.c (path_end): Skip separators appropriate for the scheme.
3056         (strpbrk_or_eos): Remove gcc-specific version, as the optimization
3057         it tried to perform no longer applies.
3058
3059 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
3060
3061         * host.c: Don't include "connect.h" now that we no longer have
3062         socket_has_inet6.
3063
3064 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
3065
3066         * host.c: Remove extraneous definition of netdb.h.
3067
3068 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
3069
3070         * http.c (gethttp): Skip error message body in the keep-alive
3071         case.
3072
3073 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
3074
3075         * url.c (url_parse): Would crash when parsing fragments.  Support
3076         fragments for FTP URLs too.
3077
3078 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
3079
3080         * version.c: Don't use "cvs" in version name, since we're not
3081         using CVS anymore.
3082
3083 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
3084
3085         * progress.c (create_image): Ditto.
3086
3087         * retr.c (retr_rate): Display smaller rate numbers with greater
3088         precision.
3089
3090 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
3091
3092         * http.c (response_head_terminator): Minor optimization.
3093
3094         * retr.c (fd_read_hunk): Call terminator with pointer to the start
3095         of the data and the pointer to the current data.  Changed all
3096         callers.
3097
3098 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
3099
3100         * url.c (url_parse): Make sure u->params is not initialized for
3101         http/https URLs.
3102         (url_parse): Don't crash on garbage following []-delimited IPv6
3103         addresses.
3104
3105 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
3106
3107         * main.c (print_help): Don't refer to the non-existent -nr in
3108         description of --mirror.
3109
3110 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
3111
3112         * host.c (pretty_print_address): Renamed to just print_address.
3113         Clarify documentation.
3114
3115 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
3116
3117         * http.c (gethttp): Explicitly document the different cases when
3118         generating the Host header.
3119
3120 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
3121
3122         * host.c (pretty_print_address): Handle error result from
3123         inet_ntop.
3124
3125 2005-06-30  Gisle Vanem  <giva@bgnett.no>
3126
3127         * mswindows.c (inet_ntop): New function.  Print IPv6 addresses
3128         using WSAAddressToString.
3129
3130 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3131
3132         * progress.c (dot_update): Remove unused variable row_qty.
3133
3134 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
3135
3136         * main.c: Check for both SIGHUP and SIGUSR1 before using them.
3137
3138 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
3139
3140         * utils.c: Unconditionally include locale.h.
3141
3142 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
3143
3144         * ptimer.c: Include sys/time.h to get struct timeval.
3145
3146 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
3147
3148         * wget.h: Remove obsolete definition of with_thousand_seps_sum.
3149
3150 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
3151
3152         * gnu-md5.h: Unconditionally include limits.h.
3153
3154 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
3155
3156         * utils.c (random_number): Use lrand48 if available.
3157         (random_float): Use drand48 if available.
3158
3159 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
3160
3161         * main.c (secs_to_human_time): Use print_decimal when printing
3162         total download time in seconds.
3163
3164         * progress.c (print_row_stats): Use it to print total download
3165         time at the end of the download.
3166         (create_image): Ditto.
3167
3168         * utils.c (print_decimal): New function; print small decimal
3169         numbers with more precision than large ones.
3170
3171         * progress.c (print_row_stats): New function.  Print ETA after the
3172         download rate at the end of each row.
3173
3174 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
3175
3176         * init.c (parse_line): Check for alphanumerics.
3177
3178 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
3179
3180         * (dot_create): Remove unnecessary casts.
3181
3182 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
3183
3184         * ftp.c (getftp): Delete trailing newlines from LIST output so
3185         lines don't come out with trailing \015\012 with -S.
3186
3187 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3188
3189         * mswindows.h: Remove superfluous includes.
3190
3191 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3192
3193         * config-post.h (alloca): Amend alloca declaration to take care of
3194         all Win32 compilers, not just MSVC and MinGW.
3195
3196 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3197
3198         * utils.c (get_grouping_data): Force separator to "." rather than
3199         " " when "," is taken.
3200
3201 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3202
3203         * wget.h (PTR_FORMAT): Cast the result of sizeof to int before
3204         passing it to printf's %*.
3205
3206         * retr.h: Declare output_stream and output_stream_regular.
3207
3208         * ftp.h: Declare ftp_last_respline.
3209
3210         * convert.h: Declare dl_url_file_map.
3211
3212         * http.h: New file.
3213
3214 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3215
3216         * cookies.c: Make cookies_now static.
3217
3218 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3219
3220         * utils.c (human_readable): Remove intermediary cast to long; MSVC
3221         has problems casting *unsigned* __int64 to double.
3222
3223 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3224
3225         * sysdep.h: Use the system-provided fnmatch by default.
3226
3227 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3228
3229         * http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c.
3230         Don't compile it if GNU timegm is available.
3231         (http_atotm): Use timegm.
3232
3233 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3234
3235         * http.c (http_atotm): Correctly query the old locale value.
3236
3237 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3238
3239         * config-post.h (alloca): Don't #define alloca under MinGW32,
3240         which defines it in malloc.h, included from mswindows.h.
3241
3242 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3243
3244         * utils.c (get_grouping_data): Force the use of separators in C
3245         locale.
3246
3247 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3248
3249         * main.c (i18n_initialize): Set all locale categories.
3250
3251         * http.c (http_atotm): Temporarily set locale to "C".
3252
3253 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3254
3255         * http.c (gethttp): Improve "POST data file missing" error
3256         message.
3257
3258 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3259
3260         * progress.c (set_progress_implementation): Type COLON as const
3261         char *.
3262
3263 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
3264
3265         * utils.c (with_thousand_seps): Handle negative numbers.
3266
3267 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
3268
3269         * progress.c (create_image): Mark the "eta" string for translation.
3270
3271 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
3272
3273         * html-url.c (get_urls_file): Don't explicitly set entry->next to
3274         NULL since entry is already zeroed out.
3275
3276 2005-06-26  Gisle Vanem  <giva@bgnett.no>
3277
3278         * mswindows.h: Define gai_strerror under MinGW.
3279
3280 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
3281
3282         * utils.c (with_thousand_seps): Correctly implement thousand seps
3283         consisting of more than one character.
3284
3285 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
3286
3287         * main.c (secs_to_human_time): Ditto.
3288
3289         * progress.c (create_image): Print more exact duration of very
3290         short downloads.
3291
3292         * main.c (secs_to_human_time): Don't translate time suffixes "h",
3293         "m", and "s", which are not strictly SI, but are "accepted for use
3294         with SI".
3295         (secs_to_human_time): Print really small intervals as 0s, not
3296         0.00s.
3297
3298 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
3299
3300         * config-post.h: Replace the alloca declaration with the one from
3301         the latest Autoconf manual.  This should remove a warning with GCC
3302         on AIX.
3303
3304 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
3305
3306         * ftp.c (getftp): Always invoke SIZE, not only when continuing a
3307         download.
3308
3309         * main.c (main): Ditto here.
3310
3311         * progress.c (create_image): When the download is finished, print
3312         how long it took.
3313
3314 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
3315
3316         * main.c (main): Print the downloaded and quota amounts with the
3317         "human_readable" function.
3318
3319         * ftp.c (print_length): Ditto.
3320
3321         * http.c (gethttp): Don't display thousand separators.
3322
3323         * utils.c (with_thousand_seps): Rewritten to respect locale
3324         settings and to be type size agnostic.
3325
3326 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
3327
3328         * utils.c (human_readable): Divide with 1024 instead of shifting
3329         so the operation can work with non-integer N.
3330
3331 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
3332
3333         * progress.c (eta_to_human): New logic for more human-readable
3334         ETA.
3335
3336 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
3337
3338         * utils.c (with_thousand_seps_sum): Decrease buffer size so it
3339         cannot overrun add_thousand_seps's buffer.
3340
3341 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
3342
3343         * utils.c (SPRINTF_WGINT): The correct format is %I64d, not just
3344         %I64.
3345
3346 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
3347
3348         * http.c (http_loop): Don't warn about wildcards in HTTP URLs if
3349         globbing isn't requested in the first place.
3350
3351         * retr.c (retrieve_url): Temporarily turn off globbing when
3352         processing HTTP->FTP redirects.
3353
3354 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
3355
3356         * utils.c (with_thousand_seps_sum): Now defined only if
3357         SUM_SIZE_INT is double.
3358
3359         * wget.h (SUM_SIZE_INT): Instead of bothering with long, long
3360         long, __int64, and friends, simply either use wgint or double, end
3361         of story.  Since we know how to print either, we no longer need
3362         LARGE_INT_FMT.
3363
3364         * sysdeps.h (LARGE_INT): Renamed to SUM_SIZE_INT to better reflect
3365         its intent, and moved to wget.h.
3366
3367 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
3368
3369         * Makefile.in: No need to clean .libs.
3370
3371 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
3372
3373         * cookies.c (parse_set_cookies): Cast pointer subtraction to int
3374         before using it with %d; AIX compiler warns on this.
3375         Reported by Jens Schleusener.
3376
3377 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
3378
3379         * http.c (gethttp): Don't prepend / here.
3380
3381         * cookies.c (cookie_handle_set_cookie): Prepend / to PATH.
3382         (cookie_header): Ditto.
3383
3384 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
3385
3386         * init.c: opt.verbose must be declared as int.
3387
3388 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
3389
3390         * cmpt.c (strpbrk): Removed.
3391         (mktime): Removed.
3392         Include <time.h>.
3393
3394 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
3395
3396         * utils.c (read_file): Ditto.
3397
3398         * main.c (main): Use struct_fstat.
3399
3400         * mswindows.h (struct_fstat): Define a struct_fstat to deal with
3401         the fact that Borland 5.5 has 64-bit stat, but not 64-bit fstat!
3402
3403 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
3404
3405         * sysdep.h: Remove code that deals with Watcom.
3406
3407 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3408
3409         * all: Use bool instead of int and false/true instead of 0/non-0
3410         for boolean variables and values.
3411
3412 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3413
3414         * sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf.
3415
3416 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3417
3418         * init.c (cmd_lockable_boolean): Removed.
3419
3420 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3421
3422         * cookies.c (struct cookie): Use 1-bit bitfields for booleans
3423         which makes the structure takes less space at no cost in
3424         complexity.
3425
3426 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3427
3428         * Makefile.in ($(OBJ)): Add the config.h dependency.
3429
3430 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3431
3432         * openssl.c, connect.c, host.c: Replace instances of #ifdef
3433         ENABLE_DEBUG if (opt.debug) {...} #endif with IF_DEBUG {...}.
3434
3435         * main.c: Rename the IF_DEBUG defined here to WHEN_DEBUG.
3436
3437         * wget.h (IF_DEBUG): New macro.
3438         (DEBUGP): Define in terms of IF_DEBUG.
3439
3440 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3441
3442         * http.c (gethttp): Only handle --set-cookies (and assert that
3443         cookie jar exists) if opt.cookies is true.  Failure to do so
3444         triggered the assert when --no-cookies was used and the server
3445         sent a Set-Cookie header.  Ouch!
3446
3447 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3448
3449         * connect.c (select_fd): Expect select() to exist.
3450
3451         * utils.c (xsleep): Always use select() as sleep fallback on
3452         non-Windows platforms.
3453
3454         * ptimer.c: Delete the implementation of PTIMER_TIME.
3455
3456         * main.c: Assume existence of signal(), test for different signal
3457         names instead.
3458
3459         * cmpt.c: Better document reasons why certain functions are
3460         included.
3461
3462 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
3463
3464         * Makefile.in: Remove the manually maintained dependency list;
3465         make all object files depend on every header.
3466
3467 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
3468
3469         * hash.c: Rename "mapping" to "cell" to avoid confusion with the
3470         term "mapping" (or "map") sometimes being used for the entire hash
3471         table.  Also rename "non-empty" to "occupied" for easier reading
3472         of if (!NON_EMPTY (...)) ... .
3473
3474 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
3475
3476         * main.c, ptimer.c, sysdep.h, utils.c: Use #elif to simplify reading of
3477         chained if-else-else-else-... statements.
3478
3479 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
3480
3481         * all: Return type of signal handlers is `void'.  Include signal.h
3482         unconditionally.
3483
3484         * all: Don't explicitly cast values returned by malloc.  We no
3485         longer support ancient compilers that don't declare malloc, and we
3486         never supported C++ builds.
3487
3488 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
3489
3490         * all: Don't declare errno.  Include both time.h and sys/time.h,
3491         as long as sys/time.h exists.  Don't dereference function pointers
3492         when invoking the functions they point to.
3493
3494         * cmpt.c (memmove): Remove function mandated by C89.
3495         (strerror): Ditto.
3496         (strstr): Ditto.
3497
3498         * all: Undo the K&R-ization changes from 2005-05-03.
3499
3500         * all: Remove support for K&R compilers: use C89 function
3501         declarations, remove definition of PARAMS, remove support for
3502         varargs, and remove ansi2knr.  Assume the presence of time.h,
3503         string.h, and other headers mandated by C89.
3504
3505 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
3506
3507         * init.c (cmd_lockable_boolean): Don't recognize literal "2" and
3508         "-1" values; unlike 0 and 1, those should never be exposed to the
3509         user.  Update the error message to be more self-consistent, as
3510         proposed by Benno Schulenberg.
3511
3512 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
3513
3514         * http.c (gethttp): Don't free "head" before using it to save
3515         headers.
3516
3517 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
3518
3519         * http.c (gethttp): When -E is in use, check for file existence
3520         after appending ".html" to the name and modify the file name if
3521         necessary.
3522
3523 2005-06-17  Hrvoje Niksic  <hniksic@xemacs.org>
3524
3525         * connect.c (socket_has_inet6): Removed.
3526
3527         * host.c (lookup_host): Don't use the AI_ADDRCONFIG getaddrinfo
3528         hint.
3529
3530 2005-06-16  Hrvoje Niksic  <hniksic@xemacs.org>
3531
3532         * init.c (cmd_lockable_boolean): Improve the error message so it
3533         lists the more useful values first.
3534
3535 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
3536
3537         * http.c (gethttp): Also report the system error when the POST
3538         data file is missing.
3539
3540 2005-06-15  Benno Schulenberg  <benno@nietvergeten.nl>
3541
3542         * ftp.c, http.c, connect.c, cookies.c, html-url.c, init.c, res.c:
3543         Gettext-ize messages that were previously missed.
3544
3545 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
3546
3547         * host.h (ip_address): Remove the trailing comma from the type
3548         enum in the no-IPv6 case.
3549
3550         * main.c (struct cmdline_option): Remove the trailing comma from
3551         the enum.
3552
3553         Reported by Jens Schleusener.
3554
3555 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
3556
3557         * url.c (strpbrk_or_eos): Check for a recent GCC version before
3558         using the statement-as-expression extension.
3559
3560 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
3561
3562         * http.c (gethttp): Don't attempt to "skip short body" if we're
3563         issuing a HEAD request (in which case the response head is not
3564         followed by a body).
3565
3566 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
3567
3568         * init.c (cmd_spec_header): Don't split the string along the
3569         commas using cmd_vector; just append the new value using
3570         vec_append instead.
3571
3572         * utils.c (vec_append): New function.
3573
3574 2005-05-27  Andreas Beckmann  <debian@abeckmann.de>
3575
3576         * html-url.c (tag_handle_link): Mark the content from the <link
3577         src="..."> tag as expecting HTML.
3578
3579 2005-05-24  Hrvoje Niksic  <hniksic@xemacs.org>
3580
3581         * http.c (http_atotm): Document the origin of the "cookie date"
3582         format.
3583
3584 2005-05-21  Hrvoje Niksic  <hniksic@xemacs.org>
3585
3586         * init.c (setval_internal): Report exact command name alongside
3587         the "display name".
3588
3589 2005-05-18  Hrvoje Niksic  <hniksic@xemacs.org>
3590
3591         * cookies.c (update_cookie_field): Explicitly cast -1 to time_t to
3592         cope with systems where time_t is unsigned.
3593
3594         * cookies.c: Remove unnecessary casts to time_t from values
3595         already of that type.
3596
3597 2005-05-17  Hrvoje Niksic  <hniksic@xemacs.org>
3598
3599         * ftp.c (ftp_loop_internal): Same here.
3600
3601         * http.c (http_loop): Don't clobber the file when -c is specified
3602         and the first attempt to retrieve the file fails.
3603
3604 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
3605
3606         * openssl.c (ssl_check_certificate): Print all issues with a
3607         certificate.
3608
3609 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
3610
3611         * ftp-basic.c: Don't xfree() the line returned by ftp_response if
3612         the returned code is not FTPOK.
3613
3614 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
3615
3616         * init.c (cleanup): Don't free the non-existent opt.ftp_acc.  Free
3617         the SSL-related stuff.
3618
3619 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
3620
3621         * ftp.c (print_length): Consistently print \n at end of the
3622         "Length" line.
3623
3624 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
3625
3626         * openssl.c (ssl_connect): Announce the beginning and the end of
3627         the SSL handshake when in debug mode.
3628
3629         * wget.h (PTR_FORMAT): New macro for easier printing of pointer
3630         values.  Use %0*lx along with PTR_FORMAT instead of %p.
3631
3632 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
3633
3634         * http.c (gethttp): Would forget to close the connection when
3635         keep_alive was not used.
3636
3637 2005-05-13  Hrvoje Niksic  <hniksic@xemacs.org>
3638
3639         * openssl.c (pattern_match): Document the code that decides
3640         whether "*" matches ".".
3641
3642 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
3643
3644         * ftp-ls.c (ftp_index): Use %d to print the port number, which is
3645         now int.
3646         From Steven M. Schweda's VMS patches.
3647
3648 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
3649
3650         * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to
3651         "ftp://https//host" when SSL is not used.
3652
3653 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
3654
3655         * openssl.c (ssl_check_server_identity): Renamed to
3656         ssl_check_certificate because it does more than just checking the
3657         server's identity.
3658         (ssl_check_certificate): Tell the user about
3659         --no-check-certificate.
3660
3661 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
3662
3663         * openssl.c (ssl_init): Always use SSL_VERIFY_NONE, so that the
3664         handshake finishes even if the certificate is invalid.  That way
3665         ssl_check_server_identity can provide better diagnostics on why
3666         the verification failed.
3667
3668 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
3669
3670         * openssl.c (pattern_match): New function.
3671         (ssl_check_server_identity): Treat peer certificate common name as
3672         wildcard.
3673
3674 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
3675
3676         * openssl.c (ssl_check_server_identity): Print certificate subject
3677         and issuer.
3678
3679 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
3680
3681         * res.c (res_register_specs): Correctly pass pointers to
3682         hash_table_get_pair.
3683
3684 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
3685
3686         * http.c (gethttp): Call ssl_check_server_identity.
3687
3688         * openssl.c (ssl_check_server_identity): New function, verifies
3689         that the host name in the certificate matches the actual host
3690         name.
3691         (verify_cert_callback): Removed, since it didn't do anything
3692         except returning the preverify_ok argument.
3693
3694         * connect.c (fd_transport_context): Allow retrieval of the context
3695         pointer registered with fd_register_transport.
3696
3697 2005-05-09  Hrvoje Niksic  <hniksic@xemacs.org>
3698
3699         * openssl.c (verify_cert_callback): Renamed from verify_callback.
3700         Always return the received "ok" value.  Print the X509 name in
3701         debug mode.
3702         (ssl_init): Enable partial writes in SSL context.
3703
3704 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
3705
3706         * http.c (http_loop): Check for wildcards in the URL path
3707         component, not in the whole URL.
3708
3709         * ftp.c (ftp_loop): Check for wildcards in URL path before
3710         unescaping, so the users can escape globbing metacharacters with %
3711         escapes.
3712
3713 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
3714
3715         * init.c (run_command): Correctly interpret the return value of
3716         parse_line.
3717         (commands): Re-alphabetize.
3718
3719 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
3720
3721         * netrc.c (parse_netrc): Explicitly check for assignment != NULL
3722         to silence warning from Borland C.
3723
3724         * url.c (sync_path): Don't unnecessarily increment p.
3725         (url_parse): Don't unnecessarily set url_encode to NULL just
3726         prior to return from the function.
3727
3728 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
3729
3730         * log.c (escnonprint_internal): Place variable declarations
3731         before other statements.
3732
3733 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
3734
3735         * html-url.c: Include recur.h.
3736
3737         * http.c (request_new): Define as accepting no args.
3738
3739 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
3740
3741         * url.c (strpbrk_or_eos): Made inline.  Use strchr(s, '\0') for
3742         finding the NUL char position.
3743
3744 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
3745
3746         * url.c (decide_copy_method): Renamed to char_needs_escaping.
3747         Since it now returns only two possible values, change it to return
3748         boolean (int).
3749
3750 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
3751
3752         * ftp-basic.c (ftp_request): Prevent newlines in VALUE causing
3753         inadvertent sending of multiple FTP commands.
3754
3755 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
3756
3757         * url.c (decide_copy_method): Never cause reencode_escapes to
3758         decode % escapes; it is too intrusive and breaks some servers.
3759
3760 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
3761
3762         * http.c (gethttp): When tunnelling SSL traffic over proxy with
3763         CONNECT, we're really talking to the remote server directly.
3764         Because of this, the request-line argument must be the URL path
3765         rather than the whole URL, as it would be when using regular
3766         proxies.
3767         Reported by Charles Lane.
3768
3769 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
3770
3771         * init.c (cmd_spec_useragent): Allow empty User-Agent.
3772
3773         * http.c (gethttp): Don't print "unknown authentication scheme"
3774         for failed Basic authentication.
3775         (SET_USER_AGENT): Don't set user-agent if opt.useragent is empty.
3776         (gethttp): Use alloca for allocation of www_authenticate.
3777
3778 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
3779
3780         * main.c (print_help): Fix wording of --secure-protocol help text.
3781
3782 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
3783
3784         * cmpt.c (strstr): Updated from glibc 2.3.5.
3785
3786 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3787
3788         * http.c (http_atotm): Zero out the whole struct tm being passed
3789         to strptime.
3790
3791 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3792
3793         * main.c (main): Propagate option name to setoptval.
3794
3795         * init.c (setoptval): Accept another argument, OPTNAME.  Propagate
3796         that argument as the option name independently of the actual
3797         command, determined by command_by_name(com).
3798
3799 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3800
3801         * init.c (parse_line): Make the return value indicate whether
3802         there was a syntax error or a setter failed.
3803         (run_wgetrc): Return an indication on whether an error has been
3804         encountered.
3805         (initialize): Abort if there have been errors running either
3806         .wgetrc file.
3807
3808 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3809
3810         * log.c (copy_and_escape): Slightly reduce code repetition between
3811         the two loops.
3812
3813 2005-05-05  Charles C.Fu  <ccwf@bacchus.com>
3814
3815         * utils.c (proclist): Strip leading slash when calling fnmatch
3816         too, otherwise wildcard comparisons always fail.
3817
3818 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3819
3820         * utils.c (touch): Set access time to current time.
3821
3822 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3823
3824         * url.c (url_unescape): Don't unescape %00, it effectively
3825         truncates the string.
3826
3827 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3828
3829         * log.c (copy_and_escape): Replace the FOR_URI argument with a
3830         slightly more general mechanism for specifying different kinds of
3831         escape.
3832
3833 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3834
3835         * ftp-basic.c (ftp_response): Fix printing FTP server response.
3836
3837 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
3838
3839         * retr.c (limit_bandwidth_reset): Reset sleep_adjust.
3840         (limit_bandwidth): Don't allow huge "adjustment" values that
3841         result from being suspended for a while.
3842
3843 2005-05-04  Hrvoje Niksic  <hniksic@xemacs.org>
3844