1 2011-08-30 Giuseppe Scrivano <gscrivano@gnu.org>
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.
6 2011-08-29 Giuseppe Scrivano <gscrivano@gnu.org>
8 * gnutls.c (wgnutls_read_timeout): New function.
9 (wgnutls_read): Use wgnutls_read_timeout.
10 (wgnutls_peek): Likewise.
12 2011-08-27 Giuseppe Scrivano <gscrivano@gnu.org>
14 * main.c (print_help): Exit with an error status if print to stdout
16 (print_usage): Change method signature and return a status code.
17 (print_version): Likewise.
19 2011-08-26 Giuseppe Scrivano <gscrivano@gnu.org>
21 * gnutls.c: Include "ptimer.h".
22 (wgnutls_read): Honor read timeout.
24 * openssl.c (ssl_init): Make `meth' const.
26 2011-08-25 Giuseppe Scrivano <gscrivano@gnu.org>
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.
33 2011-08-19 Giuseppe Scrivano <gscrivano@gnu.org>
35 * init.c (home_dir) [MSDOS]: Move local variable `len' here.
37 2011-08-18 Giuseppe Scrivano <giuseppe@southpole.se>
39 * http.c (gethttp): Fix a memory leak on some errors. Free the head
42 * Makefile.am: Use an additional file "css_.c" which in turn includes
43 "wget.h" and immediately "css.c".
45 * http.c (gethttp): Reset chunked_transfer_encoding on redirections.
47 2011-08-13 Giuseppe Scrivano <gscrivano@gnu.org>
49 * retr.c (fd_read_body): Ensure max is not already defined.
51 * mswindows.h (snprintf): Remove definition.
52 (vsnprintf): Likewise.
54 2011-08-12 Giuseppe Scrivano <gscrivano@gnu.org>
56 * css.l: Remove include "wget.h".
57 Reported by: Perry Smith <pedzsan@gmail.com>.
59 2011-08-11 Giuseppe Scrivano <gscrivano@gnu.org>
61 * utils.c (abort_run_with_timeout): Use sigprocmask instead of
64 * gnutls.c (ssl_connect_wget): Remove call to deprecated function
65 `gnutls_certificate_type_set_priority'.
67 * Makefile.am (version.c): Don't invoke hg to set version string.
69 2011-08-10 Giuseppe Scrivano <gscrivano@gnu.org>
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>
77 2011-08-06 Jochen Roderburg <Roderburg@Uni-Koeln.DE>
79 * host.c (lookup_host): Ensure it doesn't print more IPs than available
82 2011-08-06 Giuseppe Scrivano <gscrivano@gnu.org>
84 * init.c (defaults): Set default value for show_all_dns_entries.
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>
91 * http.c (gethttp): Add the Cache-Control HTTP header when --no-cache
93 Reported by: Коренберг Марк <socketpair@gmail.com>.
95 2011-08-05 Giuseppe Scrivano <gscrivano@gnu.org>
97 * utils.c (acceptable): Accept always the file if it is the specified
99 Reported by: Shai Berger <shai@platonix.com>
101 2011-08-05 Giuseppe Scrivano <giuseppe@southpole.se>
103 * gnutls.c (ssl_connect_wget): Use `gnutls_priority_set_direct' instead
104 of the deprecated `gnutls_protocol_set_priority'.
106 2011-08-02 Giuseppe Scrivano <giuseppe@southpole.se>
108 * cookies.c (parse_set_cookie): If the value is quoted, do not modify
110 Reported by: Nirgal Vourgère <jmv_deb@nirgal.com>
112 2011-07-29 Giuseppe Scrivano <giuseppe@southpole.se>
114 * log.c (logprintf): Exit immediately on a SIGPIPE error.
115 Reported by: Noèl Köthe <noel@debian.org>.
117 2011-07-26 Carlos Martín Nieto <carlos@cmartin.tk> (tiny change)
119 * init.c (home_dir): Allocate path buffer dinamically.
121 2011-07-26 Giuseppe Scrivano <giuseppe@southpole.se>
123 * retr.c (retrieve_url): Do not register redirects when in spider mode.
125 2011-07-20 Merinov Nikolay <kim.roader@gmail.com>
127 * iri.c (remote_to_utf8): Add test for non-ASCII symbols with
129 * res.c (res_retrieve_file): Fix url_parse call.
131 2011-06-08 Giuseppe Scrivano <giuseppe@southpole.se>
133 * retr.c (retrieve_from_file): Parse the url careless if IRI is enabled.
134 Reported by: Volker Kuhlmann <list0570@paradise.net.nz>.
136 2011-05-24 Giuseppe Scrivano <gscrivano@gnu.org>
138 * retr.c (fd_read_body): Define max.
140 2010-12-28 Adrien Nader <adrien@notk.org> (tiny change)
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>
146 2011-05-23 Giuseppe Scrivano <gscrivano@gnu.org>
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
152 * mswindows.h [NEED_GAI_STRERROR]: remove definition for gai_strerror.
154 2011-05-15 Ray Satiro <raysatiro@yahoo.com>
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.
160 * openssl.c (openssl_read): Prevent loops on read errors.
162 2011-04-24 Giuseppe Scrivano <gscrivano@gnu.org>
164 * html-url.c: Include "exists.h".
165 * gnutls.c (wgnutls_peek): Remove local variable `ret'.
167 2011-04-21 Daniel Manrique <roadmr@tomechangosubanana.com> (tiny change)
168 * main.c (main): Set exit status when invalid host name given in
170 * html-url.c (get_urls_file): Set exit status when invalid host
171 name given in input file.
173 2011-04-19 Giuseppe Scrivano <gscrivano@gnu.org>
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.
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'.
183 * mswindows.h: Do not include <direct.h>. Remove macro definition for
186 2011-04-18 Giuseppe Scrivano <gscrivano@gnu.org>
188 * utils.c: Include <sys/time.h>. Do not include <sys/utime.h>.
189 (touch): Use `utimes' instead of `utime'.
191 * openssl.c (openssl_read): Fix build error.
193 2011-04-17 Giuseppe Scrivano <gscrivano@gnu.org>
195 * wget.h [HAVE_LIBSSL32]: Define HAVE_SSL.
197 * gnutls.c (wgnutls_peek): Use correctly FIONBIO codes under Mingw32.
198 Reported by: Ray Satiro <raysatiro@yahoo.com>
200 2011-04-13 Giuseppe Scrivano <gscrivano@gnu.org>
202 * openssl.c (openssl_poll): Check if the specified timeout is zero after
204 (openssl_peek): Make the call non-blocking.
206 2011-04-11 Cristian Rodríguez <crrodriguez@opensuse.org> (tiny change)
208 * openssl.c (ssl_init) [! OPENSSL_NO_SSL2]: Use SSLv2 only when
211 2011-04-07 Giuseppe Scrivano <gscrivano@gnu.org>
213 * gnutls.c (ssl_init): Allow X509 v1 certificates.
214 Suggested by: Ray Satiro <raysatiro@yahoo.com>
216 (wgnutls_peek): Remove tight loop around gnutls_record_recv.
218 2011-04-07 Ray Satiro <raysatiro@yahoo.com> (tiny change)
220 (wgnutls_read): Check for the GNUTLS_E_AGAIN return code in the recv
222 (wgnutls_write): Likewise.
223 (wgnutls_peek): Likewise.
225 2011-04-07 Giuseppe Scrivano <gscrivano@gnu.org>
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>
231 2011-04-04 Giuseppe Scrivano <gscrivano@gnu.org>
233 * openssl.c [WINDOWS]: Include <w32sock.h>.
234 (openssl_read): Retry the read on SSL_ERROR_WANT_READ.
236 * host.c [WINDOWS]: Include <winsock2.h> and <ws2tcpip.h>.
237 Suggested by: Ray Satiro <raysatiro@yahoo.com>.
239 * Makefile.am (LIBS): Remove @LIBSSL@ @W32LIBS@
241 2011-04-03 Giuseppe Scrivano <gscrivano@gnu.org>
243 * gnutls.c: Include <fcntl.h>.
244 (wgnutls_peek): Make the socket non blocking before attempt a read.
246 * gnutls.c: Include <sys/ioctl.h>.
247 (wgnutls_peek) [F_GETFL]: Use fcntl.
248 (wgnutls_peek) [! F_GETFL]: Use ioctl.
251 2011-03-31 Giuseppe Scrivano <gscrivano@gnu.org>
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>
257 * res.c (res_parse): Add new line to debug messages.
259 2011-03-21 Giuseppe Scrivano <gscrivano@gnu.org>
261 * iri.h (parse_charset) [!ENABLE_IRI]: Use the parameter to avoid a
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'.
268 2011-03-11 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
274 2010-11-20 Filipe Brandenburger <filbranden@gmail.com> (tiny change)
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.
280 2011-03-02 Tomasz Buchert <tomek.buchert@gmail.com> (tiny change)
282 * http.c (ensure_extension): Do not adjust the extension if the file
285 2011-02-22 Gilles Carry <gilles.carry@st.com>
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
292 wget --output-document=- --ask-password -user=foo \
293 http://foo.com/tarball.tgz | tar zxf -
295 2011-02-22 Steven Schubiger <stsc@member.fsf.org>
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.
301 2010-12-10 Evgeniy Philippov <egphilippov@googlemail.com> (tiny change)
303 * main.c (main): Initialize `total_downloaded_bytes'.
305 2010-12-09 Giuseppe Scrivano <gscrivano@gnu.org>
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>
311 2010-12-07 Jessica McKellar <jesstess@mit.edu> (tiny change)
313 * main.c: Make help message clearer.
315 2010-12-02 Giuseppe Scrivano <gscrivano@gnu.org>
317 * build_info.c.in: Do not list md5.
319 2010-12-01 Giuseppe Scrivano <gscrivano@gnu.org>
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.
327 * gnutls.c: Likewise.
332 * openssl.c: Likewise.
333 * progress.c: Likewise.
334 * ptimer.c: Likewise.
340 * retr.c (fd_read_body): Dinamically allocate `dlbuf'.
342 2010-11-27 Reza Snowdon <vivi@mage.me.uk>
344 * init.c (initialize): If 'ok' is not zero; exit, as this
345 indicates there was a problem parsing 'SYSTEM_WGETRC'.
348 2010-11-22 Giuseppe Scrivano <gscrivano@gnu.org>
351 * ftp.c (getftp): When count > 0, don't append to the existing file.
352 * http.c (gethttp): Likewise.
354 2010-11-21 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
361 2010-11-19 Giuseppe Scrivano <gscrivano@gnu.org>
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'.
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>.
372 2010-08-08 Reza Snowdon <vivi@mage.me.uk>
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.
389 2010-10-24 Jessica McKellar <jesstess@mit.edu> (tiny change)
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.
395 2010-10-24 Giuseppe Scrivano <gscrivano@gnu.org>
397 * gnutls.c (wgnutls_peek): Do not return an error when
398 `gnutls_record_recv' fails but some data is already available.
400 2010-10-23 Giuseppe Scrivano <gscrivano@gnu.org>
402 * Makefile.am (LIBS): Remove @LIBGNUTLS@ and use @W32LIBS@ as last
405 * gnutls.c (wgnutls_peek): Block until data is available.
407 2010-10-21 Giuseppe Scrivano <gscrivano@gnu.org>
409 * retr.c (retrieve_url): Do not register HTML files twice.
410 Reported by: Manfred Koizar <mkoi-pg@aon.at>.
412 2010-10-18 Manfred Koizar <mkoi-pg@aon.at> (tiny change)
414 * html-url.c (tag_handle_link): Do not assume external links type
415 to be always "text/html".
417 2010-10-16 Giuseppe Scrivano <gscrivano@gnu.org>
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'.
429 2010-10-11 Giuseppe Scrivano <gscrivano@gnu.org>
431 * ftp.c (getftp): Fix indentation.
433 2010-10-11 Steven Schubiger <stsc@member.fsf.org>
435 * ftp.c (getftp): Initialize `targ'.
437 2010-10-08 Ivanov Anton <x86mail@gmail.com> (tiny change)
439 * src/html-url.c (check_style_attr): Skip quotes when they are present.
441 2010-10-06 Giuseppe Scrivano <gscrivano@gnu.org>
443 * main.c (main): Remove unused variable `status'.
445 2010-09-25 Merinov Nikolay <kim.roader@gmail.com>
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.
457 2010-09-24 Dennis, CHENG Renquan <crquan@fedoraproject.org>
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
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.
470 2010-09-14 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
477 2010-09-12 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
483 2010-08-20 Giuseppe Scrivano <gscrivano@gnu.org>
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
489 Reported by: <sk.random@gmail.com>.
491 2010-08-09 Giuseppe Scrivano <gscrivano@gnu.org>
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.
497 Use persistent connections with proxies supporting them.
498 * http.c (gethttp): Specify Proxy-Connection to the HTTP proxy.
500 2010-08-06 Giuseppe Scrivano <gscrivano@gnu.org>
502 * css-url.c (get_uri_string): Skip empty urls.
504 2010-07-25 John Trengrove <jtrengrove@gmail.com> (tiny change)
506 * ftp.h: Added enum `parsetype'. Modified struct to hold parsetype.
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.
514 2010-07-30 Giuseppe Scrivano <gscrivano@gnu.org>
516 * html-url.h (struct map_context): Remove member `tail'.
518 * html-url.c (append_url): Append the new url ordered by `position'.
519 (get_urls_html): Do not initialize `ctx.tail'.
521 * css-url.c (get_urls_css_file): Do not initialize `ctx.tail'.
523 2010-07-29 Giuseppe Scrivano <gscrivano@gnu.org>
525 * gnutls.c (wgnutls_peek): Don't read more data if the buffered peek
528 2010-07-28 Giuseppe Scrivano <gscrivano@gnu.org>
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.
534 * init.c (commands): Add "trustservernames".
536 * options.h (library): Add variable `trustservernames'.
538 * main.c (option_data): Add trust-server-names.
539 (print_help): Describe --trust-server-names.
541 * retr.c (retrieve_url): Pass new argument to `http_loop'.
543 2010-07-20 Alan Jenkins <alan-jenkins@tuffmail.co.uk> (tiny change)
545 * http.c (gethttp): Check content-length was set before trying to
546 compare it with the already downloded filesize.
548 2010-07-20 Leonid Petrov <nouser@lpetrov.net>
550 * ftp.c (getftp): Don't attempt to retrieve the file if it is already
552 (ftp_loop_internal): Force the length to be zero for symlinks.
554 2010-07-18 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
561 2010-07-14 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
568 2010-07-14 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
575 2010-07-11 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
581 2010-07-09 Giuseppe Scrivano <gscrivano@gnu.org>
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.
589 * utils.h: Rename `read_file' to `wget_read_file'. Rename
590 `read_file_free' to `wget_read_file_free'.
592 * utils.c (wget_read_file): Renamed from `read_file'.
593 (wget_read_file_free): Renamed from `read_file_free'.
595 2010-07-05 Giuseppe Scrivano <gscrivano@gnu.org>
597 * gnutls.c (ssl_init): New local variables `ca_directory' and `dir'.
598 Load default root certificates under the `ca_directory' directory.
600 2010-07-03 Giuseppe Scrivano <gscrivano@gnu.org>
602 * gnutls.c (ssl_connect_wget): New local variable `allowed_protocols'.
603 Honor the --secure-protocol flag.
605 2010-06-20 Giuseppe Scrivano <gscrivano@gnu.org>
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>.
611 2010-06-15 Giuseppe Scrivano <gscrivano@gnu.org>
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.
618 2010-06-14 Giuseppe Scrivano <gscrivano@gnu.org>
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
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>.
633 2010-06-10 Muthu Subramanian K <muthusuba@gmail.com> (tiny change)
635 * http.c (http_loop): Increase `total_downloaded_bytes' by
636 `hstat.rd_size', not `hstat.len'.
638 2010-06-10 Giuseppe Scrivano <gscrivano@gnu.org>
640 * main.c (print_version): Drop the current maintainer line.
642 2010-06-10 Giuseppe Scrivano <gscrivano@gnu.org>
644 * Makefile.am (build_info.c): Generate the `build_info.c' file under
646 Patch by: Daniel Stenberg <daniel@haxx.se>.
648 2010-06-03 Giuseppe Scrivano <gscrivano@gnu.org>
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.
654 2010-05-31 Giuseppe Scrivano <gscrivano@gnu.org>
656 * css.l: Use option "nounput".
657 (YY_NO_INPUT): Add macro definition.
659 2010-05-31 Giuseppe Scrivano <gscrivano@gnu.org>
661 * html-parse.c (map_html_tags): Fix condition for closed tag. Handle
662 the case '>' is not specified after '/'.
664 2010-05-31 Giuseppe Scrivano <gscrivano@gnu.org>
666 * sysdep.h (_SVID_SOURCE): Remove definition.
667 (_BSD_SOURCE): Remove definition.
669 2010-05-31 Giuseppe Scrivano <gscrivano@gnu.org>
671 * recur.c (retrieve_tree): Remove variable `up_error_code'.
673 * iri.c (open_locale_to_utf8): Remove function.
675 2010-05-30 Giuseppe Scrivano <gscrivano@gnu.org>
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.
681 2010-05-27 Giuseppe Scrivano <gscrivano@gnu.org>
683 * main.c (print_usage): Accept a new parameter `error'.
684 (main): Print diagnostic messages to stderr, not stdout.
686 2010-05-27 Giuseppe Scrivano <gscrivano@gnu.org>
688 * Makefile.am (wget_SOURCES): Remove `snprintf.c'.
690 * snprintf.c: Remove file.
692 2010-05-27 Giuseppe Scrivano <gscrivano@gnu.org>
694 * main.c (main): Exit with failure when -k is specified and -O is not
697 2010-05-27 Giuseppe Scrivano <gscrivano@gnu.org>
699 * http.c (gethttp): Consider new cookies retrieved when the
702 2010-05-25 Giuseppe Scrivano <gscrivano@gnu.org>
704 * host.c (sufmatch): Do not consider zero length entries.
706 * http.c (H_10X): New macro.
707 (gethttp): Silently ignore 1xx responses.
709 2010-05-24 Giuseppe Scrivano <gscrivano@gnu.org>
711 * iri.h (dummy_iri): Define static.
713 * css-tokens.h (css_tokens): Remove variable.
715 2010-05-23 Giuseppe Scrivano <gscrivano@gnu.org>
717 * http.c (http_atotm): Count the NUL character when copying the locale
719 Reported by: Florian Weimer <fw@deneb.enyo.de>
721 2010-05-16 Giuseppe Scrivano <gscrivano@gnu.org>
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.
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.
733 * gen-md5.h: Remove file.
734 * gen-md5.c: Likewise.
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
741 2010-05-15 Giuseppe Scrivano <gscrivano@gnu.org>
743 * Makefile.am: Quote any path using $(top_srcdir) or $(top_builddir).
744 (version.c): Remove dependency from configure.ac and Makefile.am.
746 * css.l: Include "wget.h".
748 2010-05-08 Giuseppe Scrivano <gscrivano@gnu.org>
750 * Makefile.am: Update copyright years.
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.
763 * ftp-basic.c: Likewise.
764 * ftp-ls.c: Likewise.
765 * ftp-opie.c: Likewise.
768 * gen-md5.c: Likewise.
769 * gen-md5.h: Likewise.
770 * gettext.h: Likewise.
771 * gnutls.c: 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.
791 * mswindows.c: Likewise.
792 * mswindows.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.
807 * spider.c: Likewise.
808 * spider.h: Likewise.
810 * sysdep.h: Likewise.
819 2010-05-07 Giuseppe Scrivano <gscrivano@gnu.org>
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
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.
844 2010-05-06 Giuseppe Scrivano <gscrivano@gnu.org>
846 * Makefile.am (build_info.c): Generate build_info.c in the builddir,
849 2010-05-05 Giuseppe Scrivano <gscrivano@gnu.org>
851 * http.c (gethttp): Give a nicer message on a malformed status line.
853 2010-05-04 Giuseppe Scrivano <gscrivano@gnu.org>
855 * http.c (gethttp): Check `resp_status' return code and handle
858 2010-05-01 Giuseppe Scrivano <gscrivano@gnu.org>
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
867 * retr.h: Define `rb_chunked_transfer_encoding'.
869 * retr.c (fd_read_body): New variable `chunked'. New variable
870 `remaining_chunk_size'. Handle the chunked transfer encoding.
872 2010-03-04 Steven Schubiger <stsc@member.fsf.org>
874 * ftp.c (ftp_loop_internal): Omit input file from being
875 deleted after retrieval.
877 * retr.c (input_file_url): New function.
879 * retr.h: Add declaration for input_file_url.
881 2010-03-02 Steven Schubiger <stsc@member.fsf.org>
883 * retr.c (retrieve_from_file): Improve checking for a URL
884 by invoking url_valid_scheme instead of url_has_scheme.
886 * url.c (url_valid_scheme): New function.
888 * url.h: Add declaration for url_valid_scheme.
890 2010-03-02 Steven Schubiger <stsc@member.fsf.org>
892 * retr.c (retrieve_from_file): Free memory of input file.
894 2010-03-01 Steven Schubiger <stsc@member.fsf.org>
896 * retr.c (retrieve_url): Retrieve the local filename from ftp_loop.
897 (retrieve_from_file): Return if there's no input file.
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.
904 * ftp.h: Adjust declaration of ftp_loop.
906 2010-01-27 Paul Townsend <aab@purdue.edu> (tiny change)
908 * retr.c (fd_read_body): Be sure to measure timer when time has
909 elapsed, too, not just when we've made progress.
911 2010-01-13 Micah Cowan <micah@cowan.name>
913 * openssl.c: Fixed some mixed declarations-and-code.
915 2010-01-09 Micah Cowan <micah@cowan.name>
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.
921 2010-01-09 David Holman <holman.david@gmail.com> (tiny change)
923 * init.c, main.c, http.c, ftp.c, options.h: Added support for
924 --no-match-server-timestamps.
926 2009-12-03 Peter Rosin <peda@lysator.liu.se>
928 * snprintf.c (dopr): Output %p as unsigned.
930 2010-01-09 Jeremy Olexa <darkside@gentoo.org> (tiny change)
932 * init.c: Deal with systems which provide PATH_MAX in
933 sys/param.h rather than limits.h.
935 2009-10-09 Steven Schweda <sms@antinode.info>
937 * utils.c: Added characters " : \ | to the list of normal
938 caret-escaped (ODS5) characters in the char_prop[] table.
940 2009-09-22 Arvind Jamuna Dixit <ardsrk@gmail.com>
942 * http.c (extract_param, parse_content_disposition): Support
943 RFC 2231 while parsing Content-Disposition header
945 2009-10-24 Petr Pisar <petr.pisar@atlas.cz>
947 * openssl.c: Implement support for (multiple) subjectAltNames in
948 X509 certificates, not just the commonName.
950 2009-10-09 Micah Cowan <micah@cowan.name>
952 * main.c: Fix declaration of compiled_features.
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.
958 2009-09-30 Micah Cowan <micah@cowan.name>
960 * sysdep.h: Unconditionally include stdbool.h (gnulib has it for
961 systems that don't supply it.)
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().
967 vms.c: Added global string constants: compilation_string
968 (NULL), link_string (NULL), and version_string (real).
970 2009-09-24 Micah Cowan <micah@cowan.name>
972 * vms.c: Moved from vms/vms.c.
974 * sysdep.h: Use proper prototypes for snprintf, vsnprintf (thanks
977 2009-09-24 Steven Schweda <sms@antinode.info>
979 * main.c (print_version): Remove VMS-conditional build info
980 string; the new VMS builders use OS_TYPE.
982 * ftp.c (getftp): Fix accidental use of target -> targ.
984 2009-09-24 Micah Cowan <micah@cowan.name>
986 * host.c (host_errstr): host_errstr should return const char *.
988 2009-09-22 Micah Cowan <micah@cowan.name>
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.
997 * wget.h: define WINDOWS if _WIN32 or __WIN32__ is defined, but
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).
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
1011 * host.c: Don't declare h_errno when building on Windows.
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
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.
1023 2009-09-21 Micah Cowan <micah@cowan.name>
1025 * progress.c (update_speed_ring): "the the" -> "the".
1027 * css-url.c, iri.c, mswindows.c: Removed assert.h inclusion (not
1030 2009-09-11 Steven Schweda <sms@antinode.info>
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
1036 * main.c (print_version): Don't print LOCALEDIR unless NLS is
1039 * http.c (gethttp): Pass FOPEN_BIN_FLAG, instead of true.
1041 * ftp.c (ftp_retrieve_glob): Cast strcmp to assign to cmp, for a
1042 silly HP build environment.
1044 2009-09-08 Steven Schubiger <stsc@member.fsf.org>
1046 * main.c, init.c: Mark the --preserve-permissions and
1047 --html-extension option as deprecated.
1049 2009-09-06 Micah Cowan <micah@cowan.name>
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.
1056 2009-09-05 Steven Schubiger <stsc@member.fsf.org>
1058 * retr.h: Declare set_local_file() to avoid build warnings.
1060 2009-09-05 Gisle Vanem <gvanem@broadpark.no>
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.
1066 2009-09-04 Micah Cowan <micah@cowan.name>
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.
1072 2009-09-03 Micah Cowan <micah@cowan.name>
1074 * ftp-ls.c (ftp_parse_vms_ls): Replace use of localtime_r with
1075 localtime, as not all platforms have localtime_r.
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.
1081 2009-09-02 Micah Cowan <micah@cowan.name>
1083 * gettext.h: Refreshed from gettext 0.17.
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...
1089 * build_info.c.in: Removed useless "+gettext" feature ad.
1091 2009-08-29 Steven Schubiger <stsc@member.fsf.org>
1093 * convert.c (local_quote_string): Percent-encode semicolons
1094 in local file strings.
1096 2009-08-27 Micah Cowan <micah@cowan.name>
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).
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.
1106 * res.c (res_retrieve_file): Don't have retrieve_url record an
1107 exit status for robots.txt.
1109 * recur.c (retrieve_tree): Adjust to new retrieve_url signature.
1111 * main.c (main): Use the exit status stored by retrieve_url.
1113 * http.c (gethttp): Distinguish certificate verification problems
1114 from SSL connection issues.
1115 (http_loop): Handle newly-created VERIFCERTERR error code.
1117 * exits.c, exits.h: Newly added.
1119 * Makefile.am (wget_SOURCES): Add exits.c and exits.h.
1121 2009-08-27 Micah Cowan <micah@cowan.name>
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).
1127 2009-08-19 Micah Cowan <micah@cowan.name>
1129 * openssl.c (ssl_check_certificate): Only warn about an attack if
1130 the hostname would otherwise have matched. Also some formatting
1133 2009-08-19 Joao Ferreira <joao@joaoff.com>
1135 * openssl.c (ssl_check_certificate): Detect embedded NUL
1136 characters in the SSL certificate common name.
1138 2009-08-17 Tony Lewis <tlewis@exelana.com>
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
1144 2009-08-09 Michael Baeuerle <michael.baeuerle@gmx.net>
1146 * ftp.c: #include <strings.h> for strcasecmp.
1148 2009-07-28 Micah Cowan <micah@cowan.name>
1150 * main.c (option_data): Rename --html-extension to
1152 (print_help): Ditto.
1154 * options.h (struct option): Rename html_extension to
1156 * http.c (gethttp): Ditto.
1157 * convert.c (local_quote_string): Ditto.
1159 * init.c (commands): Add "adjustextension", and reflect rename
1160 change for opt.adjust_extension, for both "adjustextension" and
1163 2009-07-27 Micah Cowan <micah@cowan.name>
1165 * options.h (struct options): Added restrict_files_nonascii
1168 * url.c (FILE_CHAR_TEST): Add check for chars outside the ASCII
1171 * init.c (defaults): Add restrict_files_nonascii to initialization.
1172 (cmd_spec_restrict_file_names): Allow parsing of "ascii" keyword.
1174 2009-07-27 Marcel Telka <marcel@telka.sk>
1176 * iri.c (do_conversion): Typo: invalide -> invalid
1178 2009-07-27 Petr Pisar <petr.pisar@atlas.cz>
1180 * main.c (print_help): Fixed a couple typos.
1182 2009-07-26 Micah Cowan <micah@cowan.name>
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.
1189 2009-07-23 Micah Cowan <micah@cowan.name>
1191 * progress.c (get_eta): Change "Translation note" in comment to
1192 "TRANSLATORS", so it actually appears in wget.pot.
1194 2009-07-06 Micah Cowan <micah@cowan.name>
1196 * main.c (print_help): Improve documentation of --base.
1198 2009-07-05 Micah Cowan <micah@cowan.name>
1200 * html-url.c (tag_handle_meta): Handle meta name="robots"
1201 properly: deal with whitespace, commas after...
1203 * netrc.c (parse_netrc): Rename local-scope variable "quote" to
1204 "qmark", to avoid conflict with the function name.
1206 2009-07-05 Petr Pisar <petr.pisar@atlas.cz>
1208 * main.c (print_version): Mark initial line for translation, along
1209 with (env), (user), and (system). Change copyright year to 2009.
1211 * http.c (http_loop): Space after colon.
1213 * gnutls.c (ssl_check_certificate): Use quote function, rather
1214 than explicit quotes.
1216 2009-07-05 Micah Cowan <micah@cowan.name>
1218 * Makefile.am (version.c): Add dependency on configure.ac.
1220 * iri.c: Mark some strings for translation.
1222 2009-07-04 Steven Schweda <sms@antinode.info>
1224 * wget.h (ORIG_SFX): Macro added, to supply an alternative "_orig"
1227 * connect.c, host.c, host.h, main.c: Include "vms_ip.h" rather
1228 than <netdb.h> on VMS systems.
1230 * convert.c (write_backup_file): Use "_orig" rather than ".orig"
1233 * ftp-basic.c (ftp_list): Don't use LIST -a on VMS servers.
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.
1242 * ftp-ls.c [__VMS]: Various improvements.
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.
1251 * init.c (wgetrc_user_file_name) [__VMS]: Adjustments for where to
1254 * log.c: Adjustments to improve handling of log files on VMS.
1256 * main.c [__VMS]: Added --ftp-stmlf option (and associated
1257 documentation). Adjust description of backup-suffixes, as they now
1259 (print_help, print_version): Include OS type in version
1261 (main) [__VMS]: Invoke fopen with extra options, to specify file
1264 * netrc.c (search_netrc) [__VMS]: Fix .netrc-finding.
1266 * openssl.c, openssl.h (ssl_connect_wget): Renamed from ssl_connect.
1268 * options.h (struct options): Add ftp_stmlf field.
1270 * retr.c (write_data) [__VMS]: Avoid fflush.
1272 * url.c [__VMS]: Include vms.h.
1273 * url.c (url_file_name) [__VMS]: Handle naming as required for VMS.
1275 * utils.c [__VMS]: Include vms.h. Various added facilities for VMS
1278 2009-07-04 Micah Cowan <micah@cowan.name>
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
1285 (format_and_print_line): For similar reasons, don't calculate
1286 line-continuation tabulation based on the number of bytes in a
1289 2009-07-04 Steven Schubiger <stsc@member.fsf.org>
1291 * url.c (url_parse): If an URL scheme is invalid, distinguish
1292 between an unsupported or missing scheme.
1294 * url.c: Add a "missing scheme" entry to parse_errors.
1296 2009-07-03 Micah Cowan <micah@cowan.name>
1298 * iri.h (iri_dup): Provide macro definition for when IRIs are
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.
1306 2009-07-02 Micah Cowan <micah@cowan.name>
1308 * recur.c (url_enqueue): Quote enqueue/dequeue debug messages.
1310 * html-url.c (append_url): Change "merge()" quoting style from
1311 locale_quoting_style to escape_quoting_style.
1313 2009-07-01 Micah Cowan <micah@cowan.name>
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.
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).
1324 2009-07-01 Steven Schubiger <stsc@member.fsf.org>
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
1330 * build_info.c: Remove this static source file.
1332 * build_info.c.in: Data for generation of build_info.c.
1334 2009-06-29 Micah Cowan <micah@cowan.name>
1336 * html-url.c (append_url): Quote some more arguments that might
1337 contain characters that are inappropriate to display for the
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.
1344 * iri.c, iri.h (iri_dup): Added.
1346 * retr.c (retrieve_url): Re-parse for IRI fallback.
1348 * main.c (main): Set up iri before the url_parse invocation (so we
1351 2009-06-20 Jay Krell <jay.krell@cornell.edu>
1353 * sysdep.h (_ALL_SOURCE): (small change) Define the _ALL_SOURCE
1354 macro on INTERIX systems. (I switched the location from ftp.c to
1357 2009-06-15 Micah Cowan <micah@cowan.name>
1359 * ftp.c (getftp): If we can't accept the connection, return
1360 CONERROR, not whatever the contents of err happens to be. Fixes
1363 * retr.c (fd_read_body): Make both args to progress_create
1364 consistent, resulting in an accurate progress display. Fixes bug
1367 2009-06-14 Micah Cowan <micah@cowan.name>
1369 * Makefile.am (wget_SOURCES): css-tokens.h needs to ship with
1372 2009-06-13 Micah Cowan <micah@cowan.name>
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.
1378 2009-06-13 Julien Pichon <julienpichon7@gmail.com>
1380 * init.c: Handle tilde-expansion in wgetrc commands, without
1381 resorting to setting/unsetting globals to change behavior in one
1384 2009-06-12 Micah Cowan <micah@cowan.name>
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
1391 * build_info.c (library): Handle "https" as a feature in its own
1392 right, apart from "gnutls" and "openssl".
1394 * host.c: Declare h_errno if no declaration is provided. Idea
1395 thanks to Maciej W. Rozycki.
1397 2009-06-11 Xin Zou <zouxin2008@gmail.com>
1399 * http.c (gethttp): Fix some memory leaks.
1401 2009-06-11 Micah Cowan <micah@cowan.name>
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>.
1407 * sysdep.h: Need NAMESPACE_TWEAKS on non-Linux glibc-based
1408 systems, too. Thanks to Robert Millan.
1410 2009-05-28 Steven Schubiger <stsc@member.fsf.org>
1412 * ftp.c (ftp_get_listing): Update the "listing file"
1413 string after calling ftp_loop_internal().
1415 2009-05-27 Steven Schubiger <stsc@member.fsf.org>
1417 * ftp.c (ftp_get_listing): Duplicate the "listing file"
1418 string to avoid memory corruption when FOPEN_EXCL_ERR is
1421 2009-05-17 Steven Schubiger <stsc@member.fsf.org>
1423 * progress.c (eta_to_human_short): Fix the remaining hours
1424 to be displayed. Spotted by Tadeu Martins (#26411).
1426 2009-04-24 Micah Cowan <micah@cowan.name>
1428 * hash.c: Change stdint.h inclusion to use HAVE_STDINT_H, not C99
1431 * connect.c: stdint.h inclusion added.
1433 Thanks to Markus Duft <mduft@gentoo.org> for a similar patch.
1435 2009-04-20 Micah Cowan <micah@cowan.name>
1437 * Makefile.am (version.c): Fix unportable use of "echo -n".
1439 2009-04-13 Steven Schubiger <stsc@member.fsf.org>
1441 * ftp.c (ftp_retrieve_list): Move the duplicated code that
1442 determines the local file to a function.
1444 * http.c (http_loop): Likewise.
1446 * retr.c (set_local_file): New function.
1448 2009-04-11 Steven Schubiger <stsc@member.fsf.org>
1450 * init.c (initialize): Run a custom SYSTEM_WGETRC when
1451 provided as an environment variable.
1453 2009-02-27 Gisle Vanem <gvanem@broadpark.no>
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
1459 2009-02-27 Steven Schubiger <stsc@member.fsf.org>
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.
1465 2009-02-21 Steven Schubiger <stsc@member.fsf.org>
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.
1471 2009-02-18 Steven Schubiger <stsc@members.fsf.org>
1473 * recur.h: Remove the dangling declaration for recursive_cleanup().
1475 2009-02-01 Gerardo E. Gidoni <gerel@gnu.org>
1477 * main.c, recur.c, recur.h, res.c, retr.c, retr.h: restructured code to
1478 avoid multiple 'url_parse' calls.
1480 2008-11-13 Micah Cowan <micah@cowan.name>
1482 * http.c (gethttp): Don't do anything when content-length >= our
1485 2008-11-27 Saint Xavier <wget@sxav.eu>
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.
1492 2008-11-16 Steven Schubiger <stsc@members.fsf.org>
1494 * main.c: Declare and initialize the numurls counter.
1496 * ftp.c, http.c: Make the counter visible here and use it.
1498 * options.h: Remove old declaration from options struct.
1500 2008-11-15 Steven Schubiger <stsc@members.fsf.org>
1502 * init.c (defaults): Set default waitretry value.
1504 2008-11-14 Steven Schubiger <stsc@members.fsf.org>
1506 * main.c (format_and_print_line): Use a custom format
1507 string for printing leading spaces.
1509 2008-11-12 Micah Cowan <micah@cowan.name>
1511 * ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href.
1513 2008-11-12 Alexander Belopolsky <alexander.belopolsky@gmail.com>
1515 * url.c, url.h (url_escape_unsafe_and_reserved): Added.
1517 * ftp-ls.c (ftp_index): URL-escape, rather than HTML-escape, the
1518 filename appearing in the link.
1520 2008-11-12 Steven Schubiger <stsc@members.fsf.org>
1522 * main.c (print_version): Hand the relevant
1523 xstrdup/xfree calls back to format_and_print_line().
1525 2008-11-11 Steven Schubiger <stsc@members.fsf.org>
1527 * main.c (format_and_print_line): Move both the memory
1528 allocating and freeing bits upwards to print_version().
1530 2008-11-10 Saint Xavier <wget@sxav.eu>
1532 * http.c: Make --auth-no-challenge works with user:pass@ in URLs.
1534 2008-11-05 Micah Cowan <micah@cowan.name>
1536 * ftp.c (print_length): Should print humanized "size remaining"
1537 only when it's at least 1k.
1539 2008-10-31 Micah Cowan <micah@cowan.name>
1541 * main.c (print_version): Add information about the mailing list.
1543 2008-10-31 Alexander Drozdov <dzal_mail@mtu-net.ru>
1545 * retr.c (fd_read_hunk): Make assert deal with maxsize == 0.
1547 * ftp-ls.c (clean_line): Prevent underflow on empty lines.
1549 2008-10-26 Gisle Vanem <gvanem@broadpark.no>
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.
1555 2008-09-09 Gisle Vanem <gvanem@broadpark.no>
1557 * url.c (url_error): Use aprintf, not asprintf.
1559 2008-09-09 Micah Cowan <micah@cowan.name>
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.
1565 * build_info.c, main.c: Remove unnecessary extern vars
1566 system_wgetrc and locale_dir.
1568 * main.c: Define program_name for lib/error.c.
1570 2008-09-02 Gisle Vanem <gvanem@broadpark.no>
1572 * mswindows.h: Must ensure <stdio.h> is included before
1573 we redefine ?vsnprintf().
1575 2008-08-08 Steven Schubiger <stsc@members.fsf.org>
1577 * main.c, utils.h: Removed some dead conditional DEBUG_MALLOC code.
1579 2008-08-03 Micah Cowan <micah@cowan.name>
1581 * main.c (print_help): Added --default-page.
1583 2008-08-01 Joao Ferreira <joao@joaoff.com>
1585 * init.c, main.c, options.h, url.c: Added option --default-page
1586 to support alternative default names for index.html
1588 2008-08-03 Micah Cowan <micah@cowan.name>
1590 * build_info.c, css-url.c: #include wget.h, not config.h.
1592 2008-08-03 Steven Schubiger <stsc@members.fsf.org>
1594 * url.c, url.h (url_error): Better messages for unsupported
1595 schemes, especially https.
1597 * html-url.c, recur.c, retr.c: Adjust to new url_error
1598 invocation, and free result.
1600 2008-07-17 Steven Schubiger <stsc@members.fsf.org>
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.
1606 * init.c (cleanup): Free the memory associated with the base
1607 option (when DEBUG_MALLOC is defined).
1609 2008-07-02 Xavier Saint <wget@sxav.eu>
1611 * iri.c, iri.h : New function idn_decode() to decode ASCII
1612 encoded hostname to the locale.
1614 * host.c : Show hostname to be resolved both in locale and
1617 2008-06-28 Steven Schubiger <stsc@members.fsf.org>
1619 * retr.c (retrieve_from_file): Allow for reading the links from
1620 an external file (HTTP/FTP).
1622 2008-06-26 Xavier Saint <wget@sxav.eu>
1624 * iri.c, iri.h : New functions locale_to_utf8() and
1625 idn_encode() adding basic capabilities of IRI/IDN.
1627 * url.c : Convert URLs from locale to UTF-8 allowing a basic
1630 2008-06-25 Steven Schubiger <stsc@members.fsf.org>
1632 * ftp.c (getftp): When spidering a FTP URL, emit a diagnostic
1633 message if the remote file exists.
1635 2008-06-24 Steven Schubiger <stsc@members.fsf.org>
1637 * http.c (http_loop): Replace escnonprint() occurence with
1638 a quotearg_style() call.
1640 2008-06-24 Micah Cowan <micah@cowan.name>
1642 * ftp-ls.c (ftp_index): Don't assume time_t* is compatible with
1643 long*. Fixes crash on Windows, and probably other systems.
1645 2008-06-22 Steven Schubiger <stsc@members.fsf.org>
1647 * http.c: Explicitly initialize and deallocate the message
1648 string used by the -nv --spider functionality.
1650 2008-06-22 Steven Schubiger <schubiger@gmail.com>
1652 * http.c: Make -nv --spider include the file's name when it
1655 2008-06-22 Micah Cowan <micah@cowan.name>
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).
1662 2008-06-19 Xavier Saint <wget@sxav.eu>
1664 * iri.c, iri.h : New function check_encoding_name() as
1665 a preliminary encoding name check.
1667 * main.c, iri.c : Make use of check_encoding_name().
1669 2008-06-19 Xavier Saint <wget@sxav.eu>
1671 * iri.c : Include missing stringprep.h file and add a
1674 * init.c : set a default initial value for opt.enable_iri,
1675 opt.locale and opt.encoding_remote.
1677 2008-06-19 Xavier Saint <wget@sxav.eu>
1679 * iri.c, iri.h : Add a new function find_locale() to find
1680 out the local system encoding.
1682 * main.c : Make use of find_locale().
1684 2008-06-19 Xavier Saint <wget@sxav.eu>
1686 * html-url.c : Add "content-type" meta tag parsing for
1687 retrieving page encoding.
1689 * iri.h : Make no-op version of parse_charset() return
1692 2008-06-16 Micah Cowan <micah@cowan.name>
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.
1698 2008-06-14 Xavier Saint <wget@sxav.eu>
1700 * iri.c, iri.h : New files.
1702 * Makefile.am : Add files iri.h and conditional iri.c.
1704 * build_info.c : Add compiled feature "iri".
1706 * http.c : include iri.h and parse charset from Content-Type
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.
1713 2008-06-13 Micah Cowan <micah@cowan.name>
1715 * build_info.c: ENABLE_NTLM, not HAVE_NTLM; distinguish OpenSSL
1718 2008-06-13 Madhusudan Hosaagrahara <com.gmail.hrmadhu>
1720 * Makefile.am, main.c, init.c, init.h, build_info.c: Adds build
1721 information to the --version command line option. Fixes bug
1724 2008-06-01 Micah Cowan <micah@cowan.name>
1726 * main.c [WINDOWS]: Reopen stdout in binary mode, when -O - is
1729 2008-05-31 Micah Cowan <micah@cowan.name>
1731 * html-url.c, http.c: Avoid casts in a couple spots.
1733 2008-05-30 Henri Häkkinen <henux@users.sourceforge.net>
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.
1739 2008-05-26 Steven Schubiger <schubiger@gmail.com>
1741 * ftp.c (getftp): Replace last remaining invocation of escnonprint
1744 2008-05-19 Micah Cowan <micah@cowan.name>
1746 * main.c (main): Password prompt should be done only once (not
1747 once per argument), and should be done prior to the background
1750 2008-05-17 Steven Schubiger <schubiger@gmail.com>
1752 * init.c (defaults): Set the preferred IP family to `none' by
1755 2008-05-17 Kenny Parnell <k.parnell@gmail.com>
1757 (cmd_spec_prefer_family): Initialize prefer_family to prefer_none.
1759 2008-05-17 Micah Cowan <micah@cowan.name>
1761 * main.c (main): Handle Ctrl-D on command-line.
1763 2008-05-15 Steven Schubiger <schubiger@gmail.com>
1765 * ftp.c (getftp): Verify that the file actually exists in FTP, by
1766 checking it against the listing.
1768 2008-05-15 Micah Cowan <micah@cowan.name>
1770 * main.c (prompt_for_password): Use the quote module.
1772 2008-05-14 Micah Cowan <micah@cowan.name>
1774 * ftp.c (ftp_retrieve_list): Symlinks and other filenames
1775 should be fully quoted.
1777 2008-05-12 Micah Cowan <micah@cowan.name>
1779 * main.c (main): Downgrade "-N with -O" to a warning, and switch
1780 it off to avoid confusing messages.
1782 2008-04-30 Micah Cowan <micah@cowan.name>
1784 * progress.c (create_image): Fix glitch where too many spaces are
1785 printed on lines that don't display the ETA, in multibyte
1788 2008-04-30 Steven Schubiger <stsc@members.fsf.org>
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.
1795 * init.c: Add "ask-password" to the list of recognized commands.
1797 * options.h: Add an according boolean member to the options
1800 * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
1801 out, because they're now defined independently by config.h.
1803 2008-04-27 Rabin Vincent <rabin@rab.in>
1805 * http.c (http_loop): Fix return for the case where we don't
1806 download a file because of -nc.
1808 2008-04-27 Micah Cowan <micah@cowan.name>
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
1815 * test.c (all_tests): Add test_path_simplify.
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
1821 2008-04-26 Micah Cowan <micah@cowan.name>
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.
1827 2008-04-25 Micah Cowan <micah@cowan.name>
1829 * Makefile.am: -I foo -> -Ifoo.
1831 2008-04-24 Micah Cowan <micah@cowan.name>
1833 * main.c: Revised usage description of --convert-links to apply
1834 to CSS as well as to HTML.
1836 2008-04-23 Micah Cowan <micah@cowan.name>
1838 * utils.c (test_dir_matches_p): Added a test for the case
1839 described in issue #20518.
1841 2008-04-22 Micah Cowan <micah@cowan.name>
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
1847 2008-04-22 Ted Mielczarek <ted.mielczarek@gmail.com>
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,
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
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
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
1880 2008-04-22 Jim Paris <jim@jtan.com>
1882 * openssl.c (ssl_init): Enable combined certificate/key in
1883 single file (apparent regression from ~1.9). Resolves issue
1886 2008-04-22 Steven Schubiger <schubiger@gmail.com>
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.
1893 2008-04-22 Pranab Shenoy <pranab.loosinit.shenoy@gmail.com>
1895 * init.c: Added test_commands_sorted unit test to check is
1896 commands are sorted. Fixes bug #21245.
1898 * test.c: Added test_commands_sorted to the test suite.
1900 2008-04-22 Rabin Vincent <rabin@rab.in>
1902 * ftp.c (ftp_get_listing): Only remove .listing if it has been
1905 2008-04-22 Alain Guibert <alguibert+bts@free.fr>
1907 * test.h (mu_run_test): Move declaration before statements, for
1908 C90 conformance. Fixes bug #22789.
1910 2008-04-22 Mike Frysinger <vapier@gentoo.org>
1912 * Makefile.am: Move @LIBS@ after other libraries, for better
1913 static-linking support. Fixes bug #22143.
1915 2008-04-16 Steven Schubiger <schubiger@gmail.com>
1917 * ftp.c: Use Gnulib's quote function for printing filenames and
1919 * connect.c: Likewise.
1920 * convert.c: Likewise.
1921 * cookies.c: Likewise.
1922 * ftp-opie.c: Likewise.
1923 * gnutls.c: Likewise.
1926 * mswindows.c: Likewise.
1927 * openssl.c: Likewise.
1928 * progress.c: Likewise.
1929 * recur.c: Likewise.
1931 * utils.c: Likewise.
1933 2008-04-16 Steven Schubiger <schubiger@gmail.com>
1935 * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
1936 out, because they're now defined independently by config.h.
1938 2008-04-14 Steven Schubiger <schubiger@gmail.com>
1940 * http.c: Use Gnulib's quote function for printing filenames and
1942 * wget.h: #include "quote.h".
1944 2008-04-12 Rabin Vincent <rabin@rab.in>
1946 * mswindows.c (fake_fork_child): Don't create a logfile for
1947 --background when --quiet is used, but not --server-response.
1950 * utils.c (fork_to_background): Likewise.
1952 2008-04-12 Micah Cowan <micah@cowan.name>
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
1959 2008-04-11 Alexander Dergachev <cy6erbr4in@gmail.com>
1961 * utils.c (aprintf): Now we are setting limits (1 Mb) for text
1962 buffer when we use non-C99 vsnprintf.
1964 2008-04-11 Micah Cowan <micah@cowan.name>
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
1971 2008-04-10 Alexander Dergachev <cy6erbr4in@gmail.com>
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.
1977 2008-03-19 Micah Cowan <micah@cowan.name>
1979 * utils.c (test_dir_matches_p): More tests related for
1982 2008-03-17 Micah Cowan <micah@cowan.name>
1984 * connect.c: Include sys/time.h to support use of the select
1985 function on older systems.
1987 2008-02-11 Benno Schulenberg <bensberg@justemail.net>
1989 * http.c: More accurate and descriptive messages for when a file
1990 won't be retrieved during spider-mode.
1992 2008-02-10 Micah Cowan <micah@cowan.name>
1994 * http.c: Added existence_checked member to the http_stat
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
2007 2008-02-07 Micah Cowan <micah@cowan.name>
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).
2013 2008-02-06 Micah Cowan <micah@cowan.name>
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
2019 * wget.h: Determine whether to use NLS for progress-bars, based
2020 on whether wcwidth and mbtowc are available.
2022 2008-02-03 Micah Cowan <micah@cowan.name>
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
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.
2034 2008-01-31 Micah Cowan <micah@cowan.name>
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.
2041 2008-01-25 Micah Cowan <micah@cowan.name>
2043 * main.c: Added notes to translators regarding (C), diacritics
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.
2056 2007-12-10 Micah Cowan <micah@cowan.name>
2058 * main.c: The option is --content-disposition, not
2059 --no-content-disposition (at the moment).
2061 2007-12-08 Hrvoje Niksic <hniksic@xemacs.org>
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.
2068 2007-12-07 Micah Cowan <micah@cowan.name>
2070 * Makefile.am: Plug in vars to include stuff from
2071 $(top_srcdir)/md5 when appropriate.
2073 2007-12-05 Micah Cowan <micah@cowan.name>
2075 * utils.c (subdir_p): Handle the case where d1 is "".
2076 * convert.c (convert_all_links): Don't return without
2079 2007-11-28 Micah Cowan <micah@cowan.name>
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.
2094 2007-10-30 Micah Cowan <micah@cowan.name>
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.
2100 2007-10-22 Gisle Vanem <gvanem@broadpark.no>
2102 * mswindows.c: Move INHIBIT_WRAP macro definition up with wget.h
2105 2007-10-18 Steven Schweda <sms@antinode.org>
2107 * sysdep.h: #include <stdint.h> as well as <inttypes.h>, to work
2108 around a glitch on Tru64 systems.
2110 2007-10-18 Micah Cowan <micah@cowan.name>
2112 * Makefile.am: version.c should not be distributed. Removed
2113 config-post.h. Add version.c dependency and gnulib include path
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
2126 2007-10-15 Micah Cowan <micah@cowan.name>
2128 * Makefile.am: Remove intermediary hg-id file generation, make
2129 version.c-generation more portable.
2131 2007-10-14 Micah Cowan <micah@cowan.name>
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
2142 * main.c (main): --spider or --delete-after now implies
2143 --no-directories (thanks, Josh Williams).
2145 2007-10-14 Joshua David Williams <yurimxpxman@gmail.com>
2147 * recur.c (download_child_p): Remove robots.txt if
2148 --delete-after or --spider is on.
2150 2007-10-13 Micah Cowan <micah@cowan.name>
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
2157 2007-10-10 Micah Cowan <micah@cowan.name>
2159 * http-ntlm.c: Include openssl/opensslv.h explicitly, instead of
2160 hoping it'll be included by accident in openssl/des.h.
2162 2007-10-09 Gisle Vanem <gvanem@broadpark.no>
2164 * mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer
2165 needed. Hence simply the prototype. Free 'exec_name' at exit.
2167 2007-10-09 Micah Cowan <micah@cowan.name>
2169 * gettext.h: Imported from /usr/share/gettext, fuller handling
2171 * wget.h: Remove logic for handling lack of NLS (now in
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
2178 2007-10-08 Micah Cowan <micah@cowan.name>
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).
2186 2007-10-04 Micah Cowan <micah@cowan.name>
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.
2194 2007-10-02 Gisle Vanem <gvanem@broadpark.no>
2196 * ftp.c: Use "_listing" for MSDOS (".listing" is illegal).
2198 * url.c: Update comment for 'filechr_not_windows'.
2200 * utils.c: Include <process.h> for 'getpid()' on Watcom.
2202 2007-10-02 Micah Cowan <micah@cowan.name>
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
2209 * http.c (gethttp): Warn about host lookup failures. Adjusted
2210 from Stephen Gildea's patch.
2212 2007-10-02 Stephen Gildea <stepheng+wget@gildea.com>
2214 * connect.c (connect_to_host): Warn about host lookup failures.
2216 2007-09-25 Micah Cowan <micah@cowan.name>
2218 * Makefile.in: Use EXEEXT instead of exeext.
2220 2007-09-24 Gisle Vanem <giva@bgnett.no>
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.
2225 2007-09-24 Jochen Roderburg <roderburg@uni-koeln.de>
2227 * http.c (http_zero): Remove no-longer-used local_size variable.
2230 2007-09-12 Micah Cowan <micah@cowan.name>
2232 * http.c (http_loop): Remove send_head_first from condition for
2235 2007-08-29 Micah Cowan <micah@cowan.name>
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
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.
2246 2007-08-27 Gisle Vanem <giva@bgnett.no>
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.
2262 2007-08-27 Micah Cowan <micah@cowan.name>
2264 * wget.h: Added macro replacement for ngettext, for environs
2267 2007-08-26 Micah Cowan <micah@cowan.name>
2269 * spider.c (print_broken_links): Fixed incorrect plurals msgid
2270 usage, switched to use ngettext function.
2272 2007-08-24 Micah Cowan <micah@cowan.name>
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
2291 2007-08-23 Joshua David Williams <yurimxpxman@gmail.com>
2293 * spider.c (in_url_list_p): Removed the bool verbose argument
2295 2007-08-22 Mauro Tortonesi <mauro@ferrara.linux.it>
2297 * http.c (http_loop): Fall back to GET if HEAD fails with a 500 or 501
2300 2007-08-21 Mauro Tortonesi <mauro@ferrara.linux.it>
2302 * http.c (http_loop): Send preliminary HEAD request if -N is given and
2303 the destination file exists already.
2305 2007-08-10 Mauro Tortonesi <mauro@ferrara.linux.it>
2307 * http.c (http_loop): Fixed HTTP HEAD requests logic when --spider is
2310 2007-08-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2312 * url.c (append_uri_pathel): Do not assume dest string to be
2314 (test_append_uri_pathel): Terminate string to fix test failure.
2316 2007-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2318 * url.c (url_string): Use comparison, not assignment, in
2319 check for auth_mode == URL_AUTH_HIDE_PASSWD.
2321 2007-08-09 Micah Cowan <micah@cowan.name>
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
2327 2007-08-08 Micah Cowan <micah@cowan.name>
2329 * init.c (defaults): Content disposition will not be default,
2330 since it currently results in extra round-trips.
2332 2007-07-31 Micah Cowan <micah@cowan.name>
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().
2338 2007-07-29 Micah Cowan <micah@cowan.name>
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.
2347 2007-07-28 Micah Cowan <micah@cowan.name>
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.
2357 2007-07-25 Micah Cowan <micah@cowan.name>
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.
2375 2007-07-16 Joshua David Williams <yurimxpxman@gmail.com>
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
2382 2007-07-16 Joshua David Williams <yurimxpxman@gmail.com>
2384 * test.h: tests made more verbose; now displays the name
2387 2007-07-10 Mauro Tortonesi <mauro@ferrara.linux.it>
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.
2393 2007-07-05 Micah Cowan <micah@cowan.name>
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
2410 2007-07-04 Mauro Tortonesi <mauro@ferrara.linux.it>
2412 * http.c (http_loop): Skip HEAD request and start immediately with GET
2415 2007-02-02 Hrvoje Niksic <hniksic@xemacs.org>
2417 * http.c (print_server_response): Escape non-printable characters
2420 2007-02-02 Hrvoje Niksic <hniksic@xemacs.org>
2422 * netrc.c: Don't make netrc_list static, as it prevents
2423 compilation with DEBUG_MALLOC.
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
2429 2007-01-23 Hrvoje Niksic <hniksic@xemacs.org>
2431 * cookies.c (parse_set_cookie): Would erroneously discard cookies
2432 with unparsable expiry time.
2434 2007-01-23 Hrvoje Niksic <hniksic@xemacs.org>
2436 * progress.c (create_image): Check for ETA overflow.
2437 (print_row_stats): Ditto.
2439 2007-01-09 Mauro Tortonesi <mauro@ferrara.linux.it>
2441 * init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc
2442 warning about strict-aliasing violation.
2444 2007-01-09 Steven M. Schweda <sms@antinode.org>
2446 * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.
2448 2006-12-29 Gisle Vanem <giva@bgnett.no>
2450 * mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
2452 2006-12-27 Mauro Tortonesi <mauro@ferrara.linux.it>
2454 * http.c (parse_content_disposition): Consider directory prefix, if
2457 2006-11-21 Hrvoje Niksic <hniksic@xemacs.org>
2459 * retr.c (retrieve_from_file): Ditto.
2460 (url_uses_proxy): New function.
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.
2466 2006-10-17 Mike Grant <mggr@pml.ac.uk>
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.
2472 2006-10-12 Mauro Tortonesi <mauro@ferrara.linux.it>
2474 * convert.c (downloaded_file): Fixed bug which used to break -E -k -K
2477 2006-08-28 Mauro Tortonesi <mauro@ferrara.linux.it>
2479 * http.c: #include'd spider.h to get rid of compiler warnings.
2485 2006-08-24 Mauro Tortonesi <mauro@ferrara.linux.it>
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.
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.
2497 * res.c (res_retrieve_file): Disable opt.timestamping and opt.spider
2498 when retrieving robots.txt. Updated copyright information.
2500 * convert.c: Moved code tracking broken links to spider.c.
2504 * spider.c: Created new file to keep track of visited URLs in spider
2509 2006-08-21 Mauro Tortonesi <mauro@ferrara.linux.it>
2511 * http.c: Fixed timestamping-related bug.
2513 2006-08-16 Mauro Tortonesi <mauro@ferrara.linux.it>
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.
2519 2006-08-08 Hrvoje Niksic <hniksic@xemacs.org>
2521 * utils.c (datetime_str): Avoid code repetition with time_str.
2523 2006-07-21 Hrvoje Niksic <hniksic@xemacs.org>
2525 * init.c (commands): Correctly place "contentdisposition".
2527 2006-07-14 Mauro Tortonesi <mauro@ferrara.linux.it>
2529 * sysdep.h: If intptr_t isn't defined, simply typedef it to long.
2531 * http.c: Added explicit cast to int in logprintf call to remove
2532 compiler warnings on 64-bit platforms.
2534 * connect.c: Added a few casts to intptr_t to remove compiler warnings
2535 on 64-bit platforms.
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.
2540 * all: Update copyright information.
2542 2006-07-10 KJKHyperion <hackbunny@reactos.com>
2544 * url.c (filechr_table): Mark DEL (0x7f) as a control character
2545 and | as a character Windows can't handle.
2547 2006-06-28 Mauro Tortonesi <mauro@ferrara.linux.it>
2549 * res.c: Implemented is_robots_txt_url function for detection of
2550 robots.txt URLs and related test routine.
2554 * url.c: Implemented are_urls_equal function for URL comparison and
2555 related testing routine.
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.
2563 * test.c: Call tests routines for are_urls_equal and
2566 2006-06-26 Hrvoje Niksic <hniksic@xemacs.org>
2568 * wget.h (wgint): Typedef to any 64-bit (or larger) type we can
2569 find, not necessarily off_t or long.
2571 2006-06-26 Hrvoje Niksic <hniksic@xemacs.org>
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.
2577 2006-06-21 Hrvoje Niksic <hniksic@xemacs.org>
2579 * utils.c (base64_encode): Cast void pointer to char * before
2582 2006-06-20 Hrvoje Niksic <hniksic@xemacs.org>
2584 * utils.c (base64_encode): Made TBL const.
2585 (base64_decode): Made the base64_char_to_value table const.
2587 2006-06-19 Hrvoje Niksic <hniksic@xemacs.org>
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.
2594 2006-06-19 Hrvoje Niksic <hniksic@xemacs.org>
2596 * utils.c (base64_encode): Would read past end of STR.
2597 Reported by rick@eckle.org.
2599 2006-06-13 Mauro Tortonesi <mauro@ferrara.linux.it>
2601 * options.h (struct options): Introduced member restrict_files_case to
2602 keep track of preferences on character case restrictions for
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.
2609 * url.c: Modified append_uri_pathel to support character case
2610 restrictions for filenames. Added test_append_uri_pathel unit test.
2612 * test.c: Added test_cmd_spec_restrict_file_names and
2613 test_append_uri_pathel to the list of unit tests to run.
2615 2006-06-12 Mauro Tortonesi <mauro@ferrara.linux.it>
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
2621 * main.c: Automatically turn on opt.follow_ftp in case of recursive
2622 FTP retrieval through HTTP proxy.
2624 2006-06-12 Tony Lewis <tlewis@exelana.com>
2626 * main.c: Improved CHEN Peng's patch by proposing a simpler logic.
2628 2006-06-12 CHEN Peng <chenpeng@alumni.nus.edu.sg>
2630 * main.c: Use retrieve_tree in case of recursive FTP retrieval through
2633 2006-05-25 Mauro Tortonesi <mauro@ferrara.linux.it>
2635 * convert.c: Added mechanisms to keep track broken links.
2639 * wget.h: Reordered and enumerated uerr_t constants.
2641 * recur.c: Fixes to support recursive spider mode.
2645 * main.c: Print broken links in case of recursive spider mode.
2647 * retr.c: Changed interface of retrieve_url.
2651 * ftp.c: Changed interface of ftp_loop.
2655 * res.c: Minor change to reflect changes in interface of retrieve_url.
2657 2006-05-18 Lawrence Jones <lawrence.jones@ugs.com>
2659 * ftp-ls.c (ftp_parse_unix_ls): Correct size parsing, add size
2660 and filename debugging output.
2662 2006-04-28 Mauro Tortonesi <mauro@ferrara.linux.it>
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.
2668 * options.h: Added option --no-content-disposition to disable parsing
2669 of HTTP Content-Disposition header.
2675 2006-04-11 Hrvoje Niksic <hniksic@xemacs.org>
2677 * hash.c (TOLOWER): Wrap macro arg in parentheses.
2679 2006-04-08 Hrvoje Niksic <hniksic@xemacs.org>
2681 * http.c (parse_content_disposition): Doc fix.
2683 2006-03-15 Mauro Tortonesi <mauro@ferrara.linux.it>
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.
2691 * utils.h: Changed all frontcmp occurrences to subdir_p.
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
2699 * http.c (test_parse_content_disposition): Changed return type from
2700 char * to const char *.
2702 2006-03-14 Mauro Tortonesi <mauro@ferrara.linux.it>
2704 * recur.c (struct queue_element): Changed type of html_allowed member
2707 2006-03-09 Mauro Tortonesi <mauro@ferrara.linux.it>
2709 * ftp.c (ftp_list): Try `LIST -a' command first and revert to `LIST'
2712 2006-03-06 Hrvoje Niksic <hniksic@xemacs.org>
2714 * hash.c (TOLOWER): Fix definition when STANDALONE.
2715 Reported by Beni Serfaty.
2717 2006-03-02 Mauro Tortonesi <mauro@ferrara.linux.it>
2719 * http.c (http_loop): Fixed recursive HTTP retrieval.
2721 2006-02-28 Hrvoje Niksic <hniksic@xemacs.org>
2723 * http.c (extract_param): Declare extern so it can be used from
2725 (extract_param): Return error for empty name.
2727 2006-02-28 Hrvoje Niksic <hniksic@xemacs.org>
2729 * url.c (find_last_char): Define in terms of memrchr.
2731 * cmpt.c (memrchr): Define it on systems that don't have it.
2733 * http.c (extract_param): New function for parsing header values
2735 (parse_content_disposition): Use it. Don't allow slashes and
2736 backslashes in the file name.
2738 2006-02-27 Hrvoje Niksic <hniksic@xemacs.org>
2740 * url.c (path_simplify): Don't preserve ".." at beginning of path.
2741 Suggested by Frank McCown.
2743 2006-02-25 Hrvoje Niksic <hniksic@xemacs.org>
2745 * http.c (gethttp): Only use FILE.N.html if FILE.html exists.
2747 2006-02-09 Hrvoje Niksic <hniksic@xemacs.org>
2749 * mswindows.c (run_with_timeout): Made thread_hnd non-static.
2751 2006-02-05 Hrvoje Niksic <hniksic@xemacs.org>
2753 * retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of
2754 the specified wait period.
2756 2006-02-03 Hrvoje Niksic <hniksic@xemacs.org>
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
2761 (number_to_string): Removed the SPRINTF_WGINT macro.
2763 2006-02-03 Mauro Tortonesi <mauro@ferrara.linux.it>
2765 * http.c: Fixed support for Content-Disposition header.
2767 * test.c: Added test_parse_content_disposition to the list of unit
2770 2006-02-02 Hrvoje Niksic <hniksic@xemacs.org>
2772 * hash.c: Don't define countof if it's already defined.
2774 * hash.c: Obtain the definition of uintptr_t when standalone.
2776 2006-01-30 Mauro Tortonesi <mauro@ferrara.linux.it>
2778 * http.c: Changed output format. Removed excessively verbose debugging
2781 2005-12-07 Mauro Tortonesi <mauro@ferrara.linux.it>
2783 * http.c: Fixed pre-download verbose output which was broken by
2784 HTTP code refactoring.
2786 2005-11-23 Mauro Tortonesi <mauro@ferrara.linux.it>
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.
2793 2005-11-19 Hrvoje Niksic <hniksic@xemacs.org>
2795 * hash.c (INVALID_PTR): Use uintptr_t instead of unsigned long.
2796 (hash_pointer): Don't assume a pointer fits in `unsigned long'.
2798 2005-11-02 Mauro Tortonesi <mauro@ferrara.linux.it>
2800 * Makefile.in: Removed support for unit testing (now it is in
2803 2005-10-27 Mauro Tortonesi <mauro@ferrara.linux.it>
2805 * Makefile.in: Added basic support for unit testing.
2811 2005-10-13 Daniel Stenberg <daniel@haxx.se>
2813 * http-ntlm.c (ntlm_output): Fixed buffer overflow vulnerability.
2815 2005-10-09 Russ Allbery <rra@stanford.edu>
2817 * snprintf.c: Remove round to round_int and pow10 to pow10_int, to
2818 avoid warnings from GCC 4.0.
2820 2005-10-05 Mauro Tortonesi <mauro@ferrara.linux.it>
2822 * retr.c: Changed semantics of no_proxy_match.
2824 2005-09-17 Hrvoje Niksic <hniksic@xemacs.org>
2826 * main.c (main): Don't print the summary if nothing has been downloaded.
2828 2005-09-17 Hrvoje Niksic <hniksic@xemacs.org>
2830 * retr.c (retr_rate): Rename parameter from MSECS to SECS since it
2831 no longer holds milliseconds.
2833 2005-09-01 Hrvoje Niksic <hniksic@xemacs.org>
2835 * progress.c: Introduce symbolic constants for "magic" values of
2836 0.2 and 0.9, REFRESH_INTERVAL and ETA_REFRESH_INTERVAL.
2838 2005-08-27 Hrvoje Niksic <hniksic@xemacs.org>
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.
2844 2005-08-27 Hrvoje Niksic <hniksic@xemacs.org>
2846 * hash.c (hash_table_map): Rename to hash_table_for_each and
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.
2855 2005-08-26 Albert Chin <wget@mlists.thewrittenword.com>
2857 * Makefile.in: Use @datadir@. Define localedir as $(datadir)/locale.
2859 2005-08-26 Jeremy Shapiro <jnshapiro@gmail.com>
2861 * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY.
2863 2005-08-23 Hrvoje Niksic <hniksic@xemacs.org>
2865 * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA.
2867 2005-08-12 Hrvoje Niksic <hniksic@xemacs.org>
2869 * wget.h: Renamed strtoll_return to strtoll_type.
2871 2005-08-11 Hrvoje Niksic <hniksic@xemacs.org>
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.)
2877 2005-08-11 Hrvoje Niksic <hniksic@xemacs.org>
2879 * cmpt.c (strtoll): Define it if missing on the system and if Wget
2882 * mswindows.c (str_to_int64): Move to cmpt.c and rename to strtoll.
2884 2005-08-10 Hrvoje Niksic <hniksic@xemacs.org>
2886 * host.c (print_address): Always use inet_ntop when IPv6 is
2889 * host.h (ip_address): Simplify the data union.
2891 2005-08-09 Hrvoje Niksic <hniksic@xemacs.org>
2893 * mswindows.c (inet_ntop): Also handle IPv4 addresses for
2896 2005-08-09 Hrvoje Niksic <hniksic@xemacs.org>
2898 * http.c (gethttp): Don't read more than the amount of data
2899 specified by the content-length header.
2901 2005-08-09 Vasil Dimov <vd@datamax.bg>
2903 * ftp.c (getftp): Don't free RESPLINE if ftp_response returns a
2904 status other than FTPOK.
2906 2005-08-04 Giuseppe Bonacci <g.bonacci@libero.it>
2908 * ftp-ls.c (ftp_parse_unix_ls): Remember the position of the
2909 previous token instead of backtracking back to it.
2911 2005-07-08 Gisle Vanem <giva@bgnett.no>
2913 * mswindows.h: Include process.h to get getpid() declaration.
2915 2005-07-08 Hrvoje Niksic <hniksic@xemacs.org>
2917 * utils.c (aprintf): Use vasprintf where available.
2919 2005-07-08 Hrvoje Niksic <hniksic@xemacs.org>
2921 * url.c (rewrite_shorthand_url): Simplify code using aprintf and
2924 2005-07-07 Hrvoje Niksic <hniksic@xemacs.org>
2926 * gnutls.c (ssl_check_certificate): Check for the validity of the
2927 presented X509 certificate.
2929 2005-07-07 Hrvoje Niksic <hniksic@xemacs.org>
2931 * openssl.c (ssl_check_certificate): Print custom error messages
2932 for frequent X509 certificate problems.
2934 2005-07-07 Hrvoje Niksic <hniksic@xemacs.org>
2936 * mswindows.h: Define an alias for stat and fstat, as requested by
2938 (gai_strerror): Define to windows_strerror if NEED_GAI_STRERROR is
2941 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
2943 * mswindows.h: Use strtoll where available.
2945 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
2947 * sysdep.h: Add a full declaration of fnmatch.h.
2949 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
2951 * utils.c: Unconditionally include <setjmp.h>.
2953 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
2955 * utils.c (fnmatch_nocase): New function.
2956 (proclist): Use it instead of fnmatch when opt.ignore_case is
2958 (in_acclist): Respect opt.ignore_case.
2959 (frontcmp): Respect opt.ignore_case.
2961 * options.h (struct options): New flag opt.ignore_case.
2963 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
2965 * ptimer.c: Measure time in seconds rather than milliseconds.
2966 Adjusted all callers.
2968 2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
2970 * http.c (gethttp): When freeing MESSAGE, take into account that
2973 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
2975 * cmpt.c (timegm): Handle years after 2099.
2977 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
2979 * cmpt.c (timegm): Remove unused variable.
2981 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
2983 * cmpt.c (timegm): Don't call mktime; simply count the seconds
2984 between 1970-01-01 and the specified date.
2986 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
2988 * wget.h (or): Define HAVE_SSL when either HAVE_OPENSSL or
2989 HAVE_GNUTLS are defined.
2991 * gnutls.c: New file.
2993 2005-07-05 Hrvoje Niksic <hniksic@xemacs.org>
2995 * http.c (gethttp): Don't print the request write error message
2998 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
3000 * openssl.c (openssl_errstr): Instead of always using a large
3001 static buffer, only allocate the error string when there is an
3004 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
3006 * xmalloc.c (debugging_free): Prefix hex pointer value with "0x"
3009 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
3011 * utils.c (NEXT_BASE64_CHAR): Rename to NEXT_CHAR and simplify to
3012 get the next non-whitespace character.
3014 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
3016 * utils.c (base64_decode): Don't silently tolerate non-base64
3017 non-white-space characters in the base64 stream.
3019 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
3021 * connect.c (LAZY_RETRIEVE_INFO): Make last_tick unsigned to match
3022 transport_map_modified_tick.
3024 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
3026 * config-post.h (alloca): Updated declaration to not enumerate all
3029 2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
3031 * openssl.c (openssl_errstr): Separate error messages with "; ".
3033 2005-07-03 Hrvoje Niksic <hniksic@xemacs.org>
3035 * ftp.c (getftp): Ditto.
3037 * http.c (gethttp): Use fd_errstr.
3039 * connect.c (fd_register_transport): Restructure parameters to
3040 include only a single structure that describes transport
3043 * openssl.c (openssl_errstr): New function: dump SSL error strings
3044 into a static buffer and return a pointer to the buffer.
3046 * connect.c (fd_errstr): New function; returns transport-specific
3047 error message, or strerror(errno) if transport doesn't supply one.
3049 2005-07-03 Hrvoje Niksic <hniksic@xemacs.org>
3051 * mswindows.h: Also wrap accept() and listen().
3053 2005-07-03 Hrvoje Niksic <hniksic@xemacs.org>
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.
3059 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
3061 * host.c: Don't include "connect.h" now that we no longer have
3064 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
3066 * host.c: Remove extraneous definition of netdb.h.
3068 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
3070 * http.c (gethttp): Skip error message body in the keep-alive
3073 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
3075 * url.c (url_parse): Would crash when parsing fragments. Support
3076 fragments for FTP URLs too.
3078 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
3080 * version.c: Don't use "cvs" in version name, since we're not
3083 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
3085 * progress.c (create_image): Ditto.
3087 * retr.c (retr_rate): Display smaller rate numbers with greater
3090 2005-07-02 Hrvoje Niksic <hniksic@xemacs.org>
3092 * http.c (response_head_terminator): Minor optimization.
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
3098 2005-07-01 Hrvoje Niksic <hniksic@xemacs.org>
3100 * url.c (url_parse): Make sure u->params is not initialized for
3102 (url_parse): Don't crash on garbage following []-delimited IPv6
3105 2005-07-01 Hrvoje Niksic <hniksic@xemacs.org>
3107 * main.c (print_help): Don't refer to the non-existent -nr in
3108 description of --mirror.
3110 2005-06-30 Hrvoje Niksic <hniksic@xemacs.org>
3112 * host.c (pretty_print_address): Renamed to just print_address.
3113 Clarify documentation.
3115 2005-06-30 Hrvoje Niksic <hniksic@xemacs.org>
3117 * http.c (gethttp): Explicitly document the different cases when
3118 generating the Host header.
3120 2005-06-30 Hrvoje Niksic <hniksic@xemacs.org>
3122 * host.c (pretty_print_address): Handle error result from
3125 2005-06-30 Gisle Vanem <giva@bgnett.no>
3127 * mswindows.c (inet_ntop): New function. Print IPv6 addresses
3128 using WSAAddressToString.
3130 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3132 * progress.c (dot_update): Remove unused variable row_qty.
3134 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
3136 * main.c: Check for both SIGHUP and SIGUSR1 before using them.
3138 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
3140 * utils.c: Unconditionally include locale.h.
3142 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
3144 * ptimer.c: Include sys/time.h to get struct timeval.
3146 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
3148 * wget.h: Remove obsolete definition of with_thousand_seps_sum.
3150 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
3152 * gnu-md5.h: Unconditionally include limits.h.
3154 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
3156 * utils.c (random_number): Use lrand48 if available.
3157 (random_float): Use drand48 if available.
3159 2005-06-29 Hrvoje Niksic <hniksic@xemacs.org>
3161 * main.c (secs_to_human_time): Use print_decimal when printing
3162 total download time in seconds.
3164 * progress.c (print_row_stats): Use it to print total download
3165 time at the end of the download.
3166 (create_image): Ditto.
3168 * utils.c (print_decimal): New function; print small decimal
3169 numbers with more precision than large ones.
3171 * progress.c (print_row_stats): New function. Print ETA after the
3172 download rate at the end of each row.
3174 2005-06-28 Hrvoje Niksic <hniksic@xemacs.org>
3176 * init.c (parse_line): Check for alphanumerics.
3178 2005-06-28 Hrvoje Niksic <hniksic@xemacs.org>
3180 * (dot_create): Remove unnecessary casts.
3182 2005-06-28 Hrvoje Niksic <hniksic@xemacs.org>
3184 * ftp.c (getftp): Delete trailing newlines from LIST output so
3185 lines don't come out with trailing \015\012 with -S.
3187 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3189 * mswindows.h: Remove superfluous includes.
3191 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3193 * config-post.h (alloca): Amend alloca declaration to take care of
3194 all Win32 compilers, not just MSVC and MinGW.
3196 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3198 * utils.c (get_grouping_data): Force separator to "." rather than
3199 " " when "," is taken.
3201 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3203 * wget.h (PTR_FORMAT): Cast the result of sizeof to int before
3204 passing it to printf's %*.
3206 * retr.h: Declare output_stream and output_stream_regular.
3208 * ftp.h: Declare ftp_last_respline.
3210 * convert.h: Declare dl_url_file_map.
3214 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3216 * cookies.c: Make cookies_now static.
3218 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3220 * utils.c (human_readable): Remove intermediary cast to long; MSVC
3221 has problems casting *unsigned* __int64 to double.
3223 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3225 * sysdep.h: Use the system-provided fnmatch by default.
3227 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
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.
3233 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3235 * http.c (http_atotm): Correctly query the old locale value.
3237 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3239 * config-post.h (alloca): Don't #define alloca under MinGW32,
3240 which defines it in malloc.h, included from mswindows.h.
3242 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3244 * utils.c (get_grouping_data): Force the use of separators in C
3247 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3249 * main.c (i18n_initialize): Set all locale categories.
3251 * http.c (http_atotm): Temporarily set locale to "C".
3253 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3255 * http.c (gethttp): Improve "POST data file missing" error
3258 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3260 * progress.c (set_progress_implementation): Type COLON as const
3263 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
3265 * utils.c (with_thousand_seps): Handle negative numbers.
3267 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
3269 * progress.c (create_image): Mark the "eta" string for translation.
3271 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
3273 * html-url.c (get_urls_file): Don't explicitly set entry->next to
3274 NULL since entry is already zeroed out.
3276 2005-06-26 Gisle Vanem <giva@bgnett.no>
3278 * mswindows.h: Define gai_strerror under MinGW.
3280 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
3282 * utils.c (with_thousand_seps): Correctly implement thousand seps
3283 consisting of more than one character.
3285 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
3287 * main.c (secs_to_human_time): Ditto.
3289 * progress.c (create_image): Print more exact duration of very
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
3295 (secs_to_human_time): Print really small intervals as 0s, not
3298 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
3300 * config-post.h: Replace the alloca declaration with the one from
3301 the latest Autoconf manual. This should remove a warning with GCC
3304 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
3306 * ftp.c (getftp): Always invoke SIZE, not only when continuing a
3309 * main.c (main): Ditto here.
3311 * progress.c (create_image): When the download is finished, print
3314 2005-06-26 Hrvoje Niksic <hniksic@xemacs.org>
3316 * main.c (main): Print the downloaded and quota amounts with the
3317 "human_readable" function.
3319 * ftp.c (print_length): Ditto.
3321 * http.c (gethttp): Don't display thousand separators.
3323 * utils.c (with_thousand_seps): Rewritten to respect locale
3324 settings and to be type size agnostic.
3326 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
3328 * utils.c (human_readable): Divide with 1024 instead of shifting
3329 so the operation can work with non-integer N.
3331 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
3333 * progress.c (eta_to_human): New logic for more human-readable
3336 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
3338 * utils.c (with_thousand_seps_sum): Decrease buffer size so it
3339 cannot overrun add_thousand_seps's buffer.
3341 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
3343 * utils.c (SPRINTF_WGINT): The correct format is %I64d, not just
3346 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
3348 * http.c (http_loop): Don't warn about wildcards in HTTP URLs if
3349 globbing isn't requested in the first place.
3351 * retr.c (retrieve_url): Temporarily turn off globbing when
3352 processing HTTP->FTP redirects.
3354 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
3356 * utils.c (with_thousand_seps_sum): Now defined only if
3357 SUM_SIZE_INT is double.
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
3364 * sysdeps.h (LARGE_INT): Renamed to SUM_SIZE_INT to better reflect
3365 its intent, and moved to wget.h.
3367 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
3369 * Makefile.in: No need to clean .libs.
3371 2005-06-25 Hrvoje Niksic <hniksic@xemacs.org>
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.
3377 2005-06-24 Hrvoje Niksic <hniksic@xemacs.org>
3379 * http.c (gethttp): Don't prepend / here.
3381 * cookies.c (cookie_handle_set_cookie): Prepend / to PATH.
3382 (cookie_header): Ditto.
3384 2005-06-24 Hrvoje Niksic <hniksic@xemacs.org>
3386 * init.c: opt.verbose must be declared as int.
3388 2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
3390 * cmpt.c (strpbrk): Removed.
3394 2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
3396 * utils.c (read_file): Ditto.
3398 * main.c (main): Use struct_fstat.
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!
3403 2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
3405 * sysdep.h: Remove code that deals with Watcom.
3407 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
3409 * all: Use bool instead of int and false/true instead of 0/non-0
3410 for boolean variables and values.
3412 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
3414 * sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf.
3416 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
3418 * init.c (cmd_lockable_boolean): Removed.
3420 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
3422 * cookies.c (struct cookie): Use 1-bit bitfields for booleans
3423 which makes the structure takes less space at no cost in
3426 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
3428 * Makefile.in ($(OBJ)): Add the config.h dependency.
3430 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
3432 * openssl.c, connect.c, host.c: Replace instances of #ifdef
3433 ENABLE_DEBUG if (opt.debug) {...} #endif with IF_DEBUG {...}.
3435 * main.c: Rename the IF_DEBUG defined here to WHEN_DEBUG.
3437 * wget.h (IF_DEBUG): New macro.
3438 (DEBUGP): Define in terms of IF_DEBUG.
3440 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
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!
3447 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
3449 * connect.c (select_fd): Expect select() to exist.
3451 * utils.c (xsleep): Always use select() as sleep fallback on
3452 non-Windows platforms.
3454 * ptimer.c: Delete the implementation of PTIMER_TIME.
3456 * main.c: Assume existence of signal(), test for different signal
3459 * cmpt.c: Better document reasons why certain functions are
3462 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
3464 * Makefile.in: Remove the manually maintained dependency list;
3465 make all object files depend on every header.
3467 2005-06-20 Hrvoje Niksic <hniksic@xemacs.org>
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 (...)) ... .
3474 2005-06-20 Hrvoje Niksic <hniksic@xemacs.org>
3476 * main.c, ptimer.c, sysdep.h, utils.c: Use #elif to simplify reading of
3477 chained if-else-else-else-... statements.
3479 2005-06-20 Hrvoje Niksic <hniksic@xemacs.org>
3481 * all: Return type of signal handlers is `void'. Include signal.h
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.
3488 2005-06-19 Hrvoje Niksic <hniksic@xemacs.org>
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.
3494 * cmpt.c (memmove): Remove function mandated by C89.
3498 * all: Undo the K&R-ization changes from 2005-05-03.
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.
3505 2005-06-19 Hrvoje Niksic <hniksic@xemacs.org>
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.
3512 2005-06-18 Hrvoje Niksic <hniksic@xemacs.org>
3514 * http.c (gethttp): Don't free "head" before using it to save
3517 2005-06-18 Hrvoje Niksic <hniksic@xemacs.org>
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
3523 2005-06-17 Hrvoje Niksic <hniksic@xemacs.org>
3525 * connect.c (socket_has_inet6): Removed.
3527 * host.c (lookup_host): Don't use the AI_ADDRCONFIG getaddrinfo
3530 2005-06-16 Hrvoje Niksic <hniksic@xemacs.org>
3532 * init.c (cmd_lockable_boolean): Improve the error message so it
3533 lists the more useful values first.
3535 2005-06-15 Hrvoje Niksic <hniksic@xemacs.org>
3537 * http.c (gethttp): Also report the system error when the POST
3538 data file is missing.
3540 2005-06-15 Benno Schulenberg <benno@nietvergeten.nl>
3542 * ftp.c, http.c, connect.c, cookies.c, html-url.c, init.c, res.c:
3543 Gettext-ize messages that were previously missed.
3545 2005-06-15 Hrvoje Niksic <hniksic@xemacs.org>
3547 * host.h (ip_address): Remove the trailing comma from the type
3548 enum in the no-IPv6 case.
3550 * main.c (struct cmdline_option): Remove the trailing comma from
3553 Reported by Jens Schleusener.
3555 2005-05-30 Hrvoje Niksic <hniksic@xemacs.org>
3557 * url.c (strpbrk_or_eos): Check for a recent GCC version before
3558 using the statement-as-expression extension.
3560 2005-05-30 Hrvoje Niksic <hniksic@xemacs.org>
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).
3566 2005-05-30 Hrvoje Niksic <hniksic@xemacs.org>
3568 * init.c (cmd_spec_header): Don't split the string along the
3569 commas using cmd_vector; just append the new value using
3572 * utils.c (vec_append): New function.
3574 2005-05-27 Andreas Beckmann <debian@abeckmann.de>
3576 * html-url.c (tag_handle_link): Mark the content from the <link
3577 src="..."> tag as expecting HTML.
3579 2005-05-24 Hrvoje Niksic <hniksic@xemacs.org>
3581 * http.c (http_atotm): Document the origin of the "cookie date"
3584 2005-05-21 Hrvoje Niksic <hniksic@xemacs.org>
3586 * init.c (setval_internal): Report exact command name alongside
3589 2005-05-18 Hrvoje Niksic <hniksic@xemacs.org>
3591 * cookies.c (update_cookie_field): Explicitly cast -1 to time_t to
3592 cope with systems where time_t is unsigned.
3594 * cookies.c: Remove unnecessary casts to time_t from values
3595 already of that type.
3597 2005-05-17 Hrvoje Niksic <hniksic@xemacs.org>
3599 * ftp.c (ftp_loop_internal): Same here.
3601 * http.c (http_loop): Don't clobber the file when -c is specified
3602 and the first attempt to retrieve the file fails.
3604 2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
3606 * openssl.c (ssl_check_certificate): Print all issues with a
3609 2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
3611 * ftp-basic.c: Don't xfree() the line returned by ftp_response if
3612 the returned code is not FTPOK.
3614 2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
3616 * init.c (cleanup): Don't free the non-existent opt.ftp_acc. Free
3617 the SSL-related stuff.
3619 2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
3621 * ftp.c (print_length): Consistently print \n at end of the
3624 2005-05-14 Hrvoje Niksic <hniksic@xemacs.org>
3626 * openssl.c (ssl_connect): Announce the beginning and the end of
3627 the SSL handshake when in debug mode.
3629 * wget.h (PTR_FORMAT): New macro for easier printing of pointer
3630 values. Use %0*lx along with PTR_FORMAT instead of %p.
3632 2005-05-14 Hrvoje Niksic <hniksic@xemacs.org>
3634 * http.c (gethttp): Would forget to close the connection when
3635 keep_alive was not used.
3637 2005-05-13 Hrvoje Niksic <hniksic@xemacs.org>
3639 * openssl.c (pattern_match): Document the code that decides
3640 whether "*" matches ".".
3642 2005-05-12 Hrvoje Niksic <hniksic@xemacs.org>
3644 * ftp-ls.c (ftp_index): Use %d to print the port number, which is
3646 From Steven M. Schweda's VMS patches.
3648 2005-05-12 Hrvoje Niksic <hniksic@xemacs.org>
3650 * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to
3651 "ftp://https//host" when SSL is not used.
3653 2005-05-11 Hrvoje Niksic <hniksic@xemacs.org>
3655 * openssl.c (ssl_check_server_identity): Renamed to
3656 ssl_check_certificate because it does more than just checking the
3658 (ssl_check_certificate): Tell the user about
3659 --no-check-certificate.
3661 2005-05-11 Hrvoje Niksic <hniksic@xemacs.org>
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.
3668 2005-05-11 Hrvoje Niksic <hniksic@xemacs.org>
3670 * openssl.c (pattern_match): New function.
3671 (ssl_check_server_identity): Treat peer certificate common name as
3674 2005-05-10 Hrvoje Niksic <hniksic@xemacs.org>
3676 * openssl.c (ssl_check_server_identity): Print certificate subject
3679 2005-05-10 Hrvoje Niksic <hniksic@xemacs.org>
3681 * res.c (res_register_specs): Correctly pass pointers to
3682 hash_table_get_pair.
3684 2005-05-10 Hrvoje Niksic <hniksic@xemacs.org>
3686 * http.c (gethttp): Call ssl_check_server_identity.
3688 * openssl.c (ssl_check_server_identity): New function, verifies
3689 that the host name in the certificate matches the actual host
3691 (verify_cert_callback): Removed, since it didn't do anything
3692 except returning the preverify_ok argument.
3694 * connect.c (fd_transport_context): Allow retrieval of the context
3695 pointer registered with fd_register_transport.
3697 2005-05-09 Hrvoje Niksic <hniksic@xemacs.org>
3699 * openssl.c (verify_cert_callback): Renamed from verify_callback.
3700 Always return the received "ok" value. Print the X509 name in
3702 (ssl_init): Enable partial writes in SSL context.
3704 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
3706 * http.c (http_loop): Check for wildcards in the URL path
3707 component, not in the whole URL.
3709 * ftp.c (ftp_loop): Check for wildcards in URL path before
3710 unescaping, so the users can escape globbing metacharacters with %
3713 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
3715 * init.c (run_command): Correctly interpret the return value of
3717 (commands): Re-alphabetize.
3719 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
3721 * netrc.c (parse_netrc): Explicitly check for assignment != NULL
3722 to silence warning from Borland C.
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.
3728 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
3730 * log.c (escnonprint_internal): Place variable declarations
3731 before other statements.
3733 2005-05-08 Hrvoje Niksic <hniksic@xemacs.org>
3735 * html-url.c: Include recur.h.
3737 * http.c (request_new): Define as accepting no args.
3739 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
3741 * url.c (strpbrk_or_eos): Made inline. Use strchr(s, '\0') for
3742 finding the NUL char position.
3744 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
3746 * url.c (decide_copy_method): Renamed to char_needs_escaping.
3747 Since it now returns only two possible values, change it to return
3750 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
3752 * ftp-basic.c (ftp_request): Prevent newlines in VALUE causing
3753 inadvertent sending of multiple FTP commands.
3755 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
3757 * url.c (decide_copy_method): Never cause reencode_escapes to
3758 decode % escapes; it is too intrusive and breaks some servers.
3760 2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
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
3767 Reported by Charles Lane.
3769 2005-05-06 Hrvoje Niksic <hniksic@xemacs.org>
3771 * init.c (cmd_spec_useragent): Allow empty User-Agent.
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.
3778 2005-05-06 Hrvoje Niksic <hniksic@xemacs.org>
3780 * main.c (print_help): Fix wording of --secure-protocol help text.
3782 2005-05-06 Hrvoje Niksic <hniksic@xemacs.org>
3784 * cmpt.c (strstr): Updated from glibc 2.3.5.
3786 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
3788 * http.c (http_atotm): Zero out the whole struct tm being passed
3791 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
3793 * main.c (main): Propagate option name to setoptval.
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).
3799 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
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
3805 (initialize): Abort if there have been errors running either
3808 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
3810 * log.c (copy_and_escape): Slightly reduce code repetition between
3813 2005-05-05 Charles C.Fu <ccwf@bacchus.com>
3815 * utils.c (proclist): Strip leading slash when calling fnmatch
3816 too, otherwise wildcard comparisons always fail.
3818 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
3820 * utils.c (touch): Set access time to current time.
3822 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
3824 * url.c (url_unescape): Don't unescape %00, it effectively
3825 truncates the string.
3827 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
3829 * log.c (copy_and_escape): Replace the FOR_URI argument with a
3830 slightly more general mechanism for specifying different kinds of
3833 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
3835 * ftp-basic.c (ftp_response): Fix printing FTP server response.
3837 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
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.
3843 2005-05-04 Hrvoje Niksic <hniksic@xemacs.org>