+2003-11-16 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * ftp-basic.c: Don't include <arpa/inet.h> and others because
+ they're no longer needed.
+
+2003-11-16 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * main.c (main): Don't allow setting of both opt.ipv4_only and
+ opt.ipv6_only.
+
+ * init.c (defaults): Mark opt.ipv4_only specially when set
+ automatically.
+
+2003-11-15 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * host.c (lookup_host): Use AI_ADDRCONFIG only if the family is
+ unspecified. This ensures that specifying `--no-inet4' on systems
+ where IPv6 resolves, but doesn't work behaves the same regardless
+ of the availability of AI_ADDRCONFIG.
+
+2003-11-15 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * host.c: Don't refer to the now-removed function
+ forget_host_lookup in the documentation of lookup_host.
+
+2003-11-15 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * http.c (persistent_available_p): Correctly specify the endpoint
+ argument to socket_ip_address.
+ (gethttp): When printing the "reusing connection to..." message,
+ specify the host name of the reused connection, not the current
+ host name. That makes more sense because it provides a useful
+ piece of information -- we know to which host we're supposed to
+ connect anyway!
+
+2003-11-15 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * init.c: Make sure the options are in alphabetic order!
+
+ * host.c (lookup_host): Merge lookup_host_passive and lookup_host
+ after all -- having both would result in some code duplication.
+ (lookup_host): Set hints.ai_family to AF_INET if ipv4_only is
+ requested. Likewise, set it to AF_INET6 for ipv6_only. Specify
+ AI_ADDRCONFIG where available.
+ (lookup_host): New flag LH_REFRESH that specifies that a cached
+ entry for HOST should be refreshed.
+ (cache_query): New function.
+ (cache_store): Ditto.
+ (cache_remove): Ditto.
+ (forget_host_lookup): No longer necessary, replaced with static
+ function cache_remove.
+
+2003-11-14 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * main.c: Enable -4 and -6 only if IPv6 is enabled.
+
+2003-11-14 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (register_transport): Renamed from register_extended.
+ Explain the intended usage.
+
+2003-11-14 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * url.c (uri_merge): Merging "foo" and "bar" should result in
+ "bar", not in "foo/bar".
+ (path_simplify): Don't remove empty path elements; don't
+ special-case leading slash.
+ (path_simplify): Don't swallow ".."'s at the beginning of string.
+ E.g. simplify "foo/../../bar" as "../bar", not as "bar".
+ (append_uri_pathel): Defang ".." path element upon encountering
+ it.
+
+2003-11-13 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * http.c (persistent_available_p): Don't attempt to talk to two
+ different SSL sites over the same secure connection.
+
+2003-11-13 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * http.c (gethttp): Ditto.
+
+ * ftp.c (getftp): Use retryable_socket_connect_error instead of
+ CONNECT_ERROR.
+
+ * wget.h (CONNECT_ERROR): Removed.
+
+ * connect.c (retryable_socket_connect_error): New function instead
+ of unsupported_socket_family_error.
+
+2003-11-13 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * wget.h (CONNECT_ERROR): Use it.
+
+ * connect.c (unsupported_socket_family_error): New function.
+
+2003-11-13 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (bind_local): Renamed bindport to bind_local; return
+ the socket directly. Updated callers.
+ (accept_connection): Renamed acceptport to accept_connection;
+ return the created socket directly. Updated callers.
+
+2003-11-13 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * init.c (defaults): Turn on opt.ipv4_only if we're compiling with
+ IPv6, and AI_ADDRINFO is not available, and AF_INET6 sockets can't
+ be created.
+
+2003-11-13 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * host.c (lookup_host): Document the fact that the addresses are
+ returned in order.
+
+2003-11-12 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * utils.c: Use limits.h only where available.
+
+ * hash.c: Use INVALID_PTR and INVALID_PTR_BYTE. Include limits.h.
+
+2003-11-11 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * main.c: Added options --inet4-only and --inet6-only.
+
+2003-11-11 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * host.c (host_errstr): Use the more standard message "Unknown
+ host".
+
+2003-11-10 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (connect_to_host): Use that flag to decide whether to
+ re-resolve the host name.
+
+ * host.c (struct address_list): Added a flag that maintains
+ whether the connection worked at some point.
+
+2003-11-10 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * host.c (lookup_host): Special-case the numeric addresses only in
+ the non-IPv6 case.
+
+2003-11-10 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (resolve_bind_address): Call lookup_host_passive.
+ Make sure that opt.bind_address is resolved only once.
+
+ * host.c (lookup_host_passive): New function, handles "passive"
+ lookups.
+ (lookup_host): Remove the passive flags. Remove the
+ family-related flags -- use ip_default_family instead.
+
+2003-11-09 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * html-url.c: Get URLs from <object data="...">.
+
+2003-11-09 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * main.c (option_data): Specify the command to use for --mirror.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * cookies.c (cookie_handle_set_cookie): Specify exact match for
+ unspecified domains.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * main.c (main): Removed one-letter options `-C', `-g', `-G', and
+ `-s'.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * main.c (main): Add --dont-remove-listing for backward
+ compatibility with previous versions.
+ (print_help): Fix typo, spotted by Dennis Smit.
+
+2003-11-08 Gisle Vanem <giva@bgnett.no>
+
+ * ftp-basic.c: Support Windows-2000 ftp servers. Win-2000 *is*
+ Win-NT 5.0 so calling it ST_WINNT is okay I guess.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * progress.c (update_speed_ring): Clear the speed ring when the
+ download stalls.
+
+ * retr.c (get_contents): Specify 0.95s read timeout, so that the
+ progress gauge can be updated even when data arrives very slowly
+ or stalls.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * utils.c (wtimer_allocate): Bless the use of wtimer_read on a
+ timer that has merely been allocated because get_contents() does
+ that.
+ (wtimer_update): Abort if the timer is not initialized.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * retr.c (get_contents): Pass the timer to limit_bandwidth().
+
+ * utils.c (wtimer_update): New function instead of wget_elapsed;
+ just update the timer, but don't return anything.
+ (wtimer_read): Read and return the last known value of the timer.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * http.c (persistent_available_p): Instead of matching all the
+ addresses of HOST and last host, determine the peer's IP address
+ with socket_ip_address and see if that address is one of those
+ HOST resolves to.
+
+ * host.c (address_list_match_all): Removed.
+ (address_list_find): New function, finds an IP address in the
+ address list.
+
+ * ftp.c (ftp_do_pasv): Get the peer's address here, and pass it to
+ ftp_epsv so it doesn't need to call getpeername.
+
+ * ftp-basic.c (ftp_port): Use socket_ip_address instead of
+ getpeername.
+ (ftp_lprt): Ditto.
+
+ * connect.c (socket_ip_address): Replaces conaddr, generalized to
+ either get peer's or local address.
+ (sockaddr_get_data): Made local to this file.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * hash.c (HASH_POSITION): Explicitly accept the hash function.
+ (grow_hash_table): Extract ht->hash_function outside the loop.
+ (hash_table_remove): Ditto.
+ (hash_table_clear): Fill entries with 0xff to clear them.
+ (hash_table_remove): Mark entries as deleted with the correct
+ marker.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * http.c (persistent_available_p): No reason for the host lookup
+ to be silent -- it's a lookup like any other.
+
+2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (register_extended): Check that fd >= 0.
+
+2003-11-07 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (LAZY_RETRIEVE_INFO): Set LAST_INFO.
+
+2003-11-07 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * hash.c (NON_EMPTY): Use the all-bit-set value as the marker that
+ the field is empty. This allows NULL pointer and 0 value to be
+ used as keys, which is necessary for the connect.c code to work
+ when fd==0.
+ (hash_table_new): Fill mappings with 0xff.
+ (grow_hash_table): Ditto.
+
+2003-11-07 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * url.c (url_parse): Allow empty ports.
+
+2003-11-07 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * main.c (print_help): Break the help string into multiple chunks.
+ (cmdline_option): New option handler OPT_FUNCALL. Generalized
+ HANDLE_CMD to generic DATA.
+ (option_data): Use the new OPT_FUNCALL feature.
+
+2003-11-06 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * log.h: Declare log_init, log_close, and
+ log_request_redirect_output here.
+
+2003-11-05 Dennis Smit <ds@nerds-incorporated.org>
+
+ * main.c: (main): added --preserve-permissions option.
+
+ * ftp.c (ftp_retrieve_list): added support for
+ --preserve-permissions option.
+
+ * init.c: added support for --preserve-permission option.
+
+ * option.h: added support for --preserve-permission option.
+
+2003-11-06 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * main.c (init_switches): New function. Convert option_data to
+ long_options and short_options, which can be fed to getopt_long.
+ (main): Execute command-line options by consulting option_data.
+
+2003-11-06 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * gen_sslfunc.c (ssl_read): Implement a more correct check for
+ EINTR.
+ (ssl_write): Ditto.
+ (init_ssl): Use a global SSL context.
+
+2003-11-06 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (xclose): Free INFO even if it doesn't provide a
+ closer.
+
+2003-11-06 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c: Updated all callers of
+ iread/ssl_iread/iwrite/ssl_iwrite to use xread and xwrite instead.
+
+ * rbuf.h (struct rbuf): Removed the SSL member because SSL is
+ handled automatically by xread.
+
+ * hash.c (ptrhash): Made private.
+ (ptrcmp): Ditto.
+ (inthash): Removed.
+
+ * connect.c (select_fd): Don't set errno, leave it to the caller.
+
+ * gen_sslfunc.c (connect_ssl): Use register_extended to register
+ SSL callbacks for communication with SSL-enabled endpoints.
+ (ssl_read): New function.
+ (ssl_write): Ditto.
+ (ssl_poll): Ditto.
+ (ssl_close): Ditto.
+
+ * connect.c (register_extended): New function -- register
+ callbacks for basic socket operations.
+ (xread): Ditto.
+ (xwrite): Ditto.
+ (xclose): Ditto.
+ (sock_read): New function, default implementation for reading.
+ (sock_write): Ditto for writing.
+ (sock_poll): Ditto for polling.
+ (sock_close): Ditto for closing.
+
+2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (bindport): Fix compilation under pre-C99 compilers.
+
+2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (connect_to_ip): More compact error checking.
+ (bindport): Don't treat failed setsockopt as a fatal error.
+
+2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (resolve_bind_address): Use a more accurate error
+ message -- we're not binding to ANY, we're disabling bind
+ altogether.
+
+2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * cookies.c (save_cookies_mapper): Respect the setting of
+ keep-session-cookies.
+ (cookie_jar_load): Import session cookies.
+ Based on code submitted by Nicolas Schodet.
+
+ * utils.c (datetime_str): Use information in TM when it's
+ non-NULL.
+
+ * main.c (main): New option `--keep-session-cookies'.
+
+2003-11-04 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * Makefile.in (realclean): Delete config.h.in.
+
+2003-11-04 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * config-post.h: New file, included from now autogenerated
+ config.h.in.
+
+2003-11-04 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * progress.c (progress_handle_sigwinch): Don't call
+ determine_screen_width() from the signal handler. Instead, just
+ set a volatile variable.
+ (bar_create): Check whether SIGWINCH was received.
+ (bar_update): Ditto.
+
+ * sysdep.h: Define SYSTEM_FNMATCH only if HAVE_FNMATCH_H is true.
+
+2003-11-03 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * utils.c (xsleep): New function. Uses nanosleep where available,
+ resuming sleeps interrupted by signals. Updated callers of sleep
+ and usleep to use xsleep.
+
+2003-11-03 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * ftp-basic.c (ftp_login): Remove shadowing (and bogus)
+ declaration of SEED.
+
+2003-11-03 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * log.c (logvprintf): Documented better. Renamed to
+ log_vprintf_internal to avoid confusion with the public API
+ functions logprintf and logputs.
+
+2003-11-03 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * wget.h (N_): Don't parenthesize argument.
+
+2003-11-03 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * host.h (ADDRESS_IPV4_DATA): Don't take the address of in.s_addr
+ because that doesn't work on machines that define it as bitfield.
+
+2003-11-03 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (select_fd): Generalize the third argument into WAIT,
+ so that the caller can request waiting for both read and write.
+ Updated callers.
+
+2003-11-02 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * html-url.c (cleanup_html_url): Destroy the hash tables, don't
+ just call free on them.
+ (init_interesting): Use hash_table_put instead of string_set_add
+ because we don't need the strdup that the latter function
+ performs.
+
+ * init.c (cleanup): Don't pass NULL to cookie_jar_delete.
+
+ * xmalloc.c (xfree_real): Abort when passed a NULL pointer.
+ (xfree_debug): Print at the file and line of the offending call to
+ free.
+
+2003-11-02 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * wget.h: Retired the `boolean' type. Moved the DEFAULT_LOGFILE
+ define to log.h. Moved the INFINITE_RECURSION define to recur.h.
+
+ * xmalloc.h: Renamed FREE_MAYBE to xfree_null and moved the
+ definition from wget.h to xmalloc.h.
+
+2003-11-02 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * html-parse.c (decode_entity): New function; split the decoding
+ of entities here.
+ (convert_and_copy): Use it to decode entities.
+ (decode_entity): Handle the &apos entity.
+ (decode_entity): Don't decode Latin 1 numeric entities. Don't
+ decode �.
+
+2003-11-01 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * ftp-opie.c (calculate_skey_response): Use uint32_t instead of
+ `unsigned long' for the cheksum array. Document the function.
+
+2003-11-01 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (acceptport): Don't call select_fd when timeout is not
+ requested.
+
+2003-11-01 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * host.c: Removed the ip_default_family global variable.
+
+ * host.c (lookup_host): Document the function. Fixed declaration
+ of VEC.
+
+2003-10-31 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * various: Use new macros xnew, xnew0, xnew_array, and xnew0_array
+ in various places.
+
+2003-10-31 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * wget.h: Move declarations of malloc and logging code to
+ xmalloc.h and log.h respectively to unclutter this file.
+ (STRDUP_ALLOCA): Made it side-effect free.
+
+ * xmalloc.h: New files. Define macros xnew, xnew0, xnew_array,
+ and xnew0_array.
+
+ * xmalloc.c: New file. Move the xmalloc routines here.
+
+2003-10-31 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * connect.c (sockaddr_set_data): Remove the broken code that
+ checked for NULL address.
+
+2003-10-31 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * host.c (address_list_from_single): Removed.
+ (address_list_from_ipv4_addresses): Renamed from
+ address_list_from_vector.
+
+2003-10-31 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * sysdep.h (CLOSE): Don't call close on file descriptors less than
+ 0, i.e. on uncreated sockets.
+
+ * connect.c (resolve_bind_address): Work on struct sockaddr
+ directly.
+ (connect_to_host): Replacement for connect_to_many. Resolve HOST
+ and connect to any of its addresses. If we can't connect and the
+ host name lookup was cached, try to resolve it again. This should
+ fix problems with hosts behind dynamic DNS. Updated all callers.
+ (connect_to_ip): Replacement for connect_to_one. Removed SILENT;
+ added the argument PRINT instead. Updated all callers.
+ (set_connection_host_name): Removed.
+
+ * host.c (address_list_address_at): New function instead of
+ address_list_copy_one. It returns a pointer to ip_address *, so
+ it's not necessary to copy the data.
+ (address_list_cached_p): New function.
+ (forget_host_lookup): Ditto.
+
+ * connect.c: Got rid of the MSOCK global variable. Made bindport
+ return the local socket it creates. Added a new argument to
+ acceptport, the socket to call accept on. Updated callers.
+ (closeport): Removed.
+
+ * connect.c: Moved the sockaddr code from host.c to this file,
+ because most of that stuff is used for connecting, and has nothing
+ to do with host names anyway.
+ (sockaddr_set_data, sockaddr_get_data): New functions, replace the
+ old sockaddr_set_address, sockaddr_set_port, sockaddr_get_address,
+ and sockaddr_get_port.
+
2003-10-30 Hrvoje Niksic <hniksic@xemacs.org>
* sysdep.h: Use `S >= 8' rather than `S == 8' when looking for
2003-10-27 Mauro Tortonesi <mauro@deepspace6.net>
- * host.c, connect.c, ftp.c, ...: Added support for dual-family
- IPv6. Reworked FTP code.
+ * connect.h: changed bindport prototype and added the related
+ BIND_ON_IPV4_ONLY and BIND_ON_IPV6_ONLY flags.
+
+ * connect.c: changed bindport and resolve_bind_address to allow
+ protocol-version specific DNS resolution. modified conaddr,
+ acceptport and connect_to_one to make use of struct
+ sockaddr_storage and of the new ip_address structure.
+
+ * ftp-basic.c: added LPRT/LPSV (RFC1639) support, refactored
+ PORT/PASV (RFC959) and EPRT/EPSV (RFC2428) support code.
+
+ * ftp.c: added the ftp_do_port and ftp_do_pasv functions to
+ handle FTP over IPv6.
+
+ * ftp.h: changed prototype of ftp_epsv and added prototypes for
+ ftp_lpsv, ftp_lprt and ftp_eprt.
+
+ * host.c: renamed the
+ wget_sockaddr_set_address and wget_sockaddr_get_addr, and
+ wget_sockaddr_{s,g}et_port couples to sockaddr_{s,g}et_address and
+ sockaddr_{g,s}et_port respectively. changed
+ address_list_match_all, address_list_from_addrinfo sockaddr_len,
+ pretty_print_address, lookup_host, sockaddr_{s,g}et_address and
+ sockaddr_{g,s}et_port to make use of struct sockaddr_storage and
+ of the new ip_address structure. removed map_ipv4_to_ip and
+ map_ip_to_ipv4.
+
+ * host.h: redefined structure ip_address and removed structure
+ wget_sockaddr.
2003-10-26 Hrvoje Niksic <hniksic@xemacs.org>