summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:25 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:25 +0900
commit0600edaa5c1a04547bd6b1e0431660d6833074cd (patch)
treed099efc896b831b1046baf83d8ba3edb60c6e65c /src
parent4a9ac8023543db82c39c3db6138a8e8582f51797 (diff)
downloadwget-0600edaa5c1a04547bd6b1e0431660d6833074cd.tar.gz
wget-0600edaa5c1a04547bd6b1e0431660d6833074cd.tar.bz2
wget-0600edaa5c1a04547bd6b1e0431660d6833074cd.zip
Imported Upstream version 1.20.2upstream/1.20.2
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am3
-rw-r--r--src/Makefile.in15
-rw-r--r--src/config.h.in44
-rw-r--r--src/connect.c22
-rw-r--r--src/connect.h4
-rw-r--r--src/convert.c8
-rw-r--r--src/convert.h2
-rw-r--r--src/cookies.c5
-rw-r--r--src/cookies.h3
-rw-r--r--src/css-tokens.h4
-rw-r--r--src/css-url.c2
-rw-r--r--src/css-url.h4
-rw-r--r--src/css.c14
-rw-r--r--src/css.l4
-rw-r--r--src/css_.c14
-rw-r--r--src/exits.c3
-rw-r--r--src/exits.h3
-rw-r--r--src/ftp-basic.c6
-rw-r--r--src/ftp-ls.c8
-rw-r--r--src/ftp-opie.c3
-rw-r--r--src/ftp.c4
-rw-r--r--src/ftp.h3
-rw-r--r--src/gnutls.c5
-rw-r--r--src/hash.c5
-rw-r--r--src/hash.h4
-rw-r--r--src/host.c3
-rw-r--r--src/host.h3
-rw-r--r--src/hsts.c3
-rw-r--r--src/hsts.h3
-rw-r--r--src/html-parse.c3
-rw-r--r--src/html-parse.h3
-rw-r--r--src/html-url.c7
-rw-r--r--src/html-url.h2
-rw-r--r--src/http-ntlm.c18
-rw-r--r--src/http-ntlm.h4
-rw-r--r--src/http.c16
-rw-r--r--src/http.h3
-rw-r--r--src/init.c6
-rw-r--r--src/init.h3
-rw-r--r--src/iri.c3
-rw-r--r--src/iri.h3
-rw-r--r--src/log.c3
-rw-r--r--src/log.h3
-rw-r--r--src/main.c2
-rw-r--r--src/metalink.c2
-rw-r--r--src/metalink.h2
-rw-r--r--src/mswindows.c4
-rw-r--r--src/mswindows.h5
-rw-r--r--src/netrc.c4
-rw-r--r--src/netrc.h4
-rw-r--r--src/openssl.c32
-rw-r--r--src/options.h3
-rw-r--r--src/progress.c5
-rw-r--r--src/progress.h3
-rw-r--r--src/ptimer.c3
-rw-r--r--src/ptimer.h3
-rw-r--r--src/recur.c3
-rw-r--r--src/recur.h3
-rw-r--r--src/res.c4
-rw-r--r--src/res.h4
-rw-r--r--src/retr.c4
-rw-r--r--src/retr.h3
-rw-r--r--src/spider.c3
-rw-r--r--src/spider.h3
-rw-r--r--src/ssl.h3
-rw-r--r--src/sysdep.h3
-rw-r--r--src/url.c3
-rw-r--r--src/url.h3
-rw-r--r--src/utils.c5
-rw-r--r--src/utils.h3
-rw-r--r--src/version.h2
-rw-r--r--src/warc.c5
-rw-r--r--src/wget.h8
-rw-r--r--src/xattr.c2
-rw-r--r--src/xattr.h2
75 files changed, 284 insertions, 135 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 825a156..3af12e6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,6 @@
# Makefile for `wget' utility
-# Copyright (C) 1995-2011, 2015, 2018 Free Software Foundation, Inc.
+# Copyright (C) 1995-2011, 2015, 2018-2019 Free Software Foundation,
+# Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/src/Makefile.in b/src/Makefile.in
index 6e5dde9..a4f021b 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -15,7 +15,8 @@
@SET_MAKE@
# Makefile for `wget' utility
-# Copyright (C) 1995-2011, 2015, 2018 Free Software Foundation, Inc.
+# Copyright (C) 1995-2011, 2015, 2018-2019 Free Software Foundation,
+# Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -497,6 +498,7 @@ ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
FLOAT_H = @FLOAT_H@
FNMATCH_H = @FNMATCH_H@
+FUZZ_LIBS = @FUZZ_LIBS@
GETADDRINFO_LIB = @GETADDRINFO_LIB@
GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
@@ -744,6 +746,7 @@ GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLD = @GNULIB_STRTOLD@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
@@ -825,6 +828,7 @@ GPGME_CONFIG = @GPGME_CONFIG@
GPGME_LIBS = @GPGME_LIBS@
GREP = @GREP@
HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
@@ -916,6 +920,7 @@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
+HAVE_INITSTATE = @HAVE_INITSTATE@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISWBLANK = @HAVE_ISWBLANK@
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
@@ -941,6 +946,7 @@ HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MBTOWC = @HAVE_MBTOWC@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MKDIRAT = @HAVE_MKDIRAT@
@@ -994,6 +1000,7 @@ HAVE_SCHED_H = @HAVE_SCHED_H@
HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SETSTATE = @HAVE_SETSTATE@
HAVE_SIGACTION = @HAVE_SIGACTION@
HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
@@ -1014,6 +1021,7 @@ HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRPTIME = @HAVE_STRPTIME@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLD = @HAVE_STRTOLD@
HAVE_STRTOLL = @HAVE_STRTOLL@
HAVE_STRTOULL = @HAVE_STRTOULL@
HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@
@@ -1322,6 +1330,7 @@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_INITSTATE = @REPLACE_INITSTATE@
REPLACE_IOCTL = @REPLACE_IOCTL@
REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
@@ -1374,6 +1383,7 @@ REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM = @REPLACE_RANDOM@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
@@ -1387,6 +1397,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SELECT = @REPLACE_SELECT@
REPLACE_SETENV = @REPLACE_SETENV@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SETSTATE = @REPLACE_SETSTATE@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
@@ -1408,6 +1419,7 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOLD = @REPLACE_STRTOLD@
REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
@@ -1530,7 +1542,6 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
-runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
diff --git a/src/config.h.in b/src/config.h.in
index b4673c9..1dcbf68 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -1604,9 +1604,11 @@
#undef REPLACE_VASNPRINTF
/* File name of the Bourne shell. */
-#if defined __CYGWIN__
-/* Omit the directory part because for 32-bit Cygwin programs in a
- 64-bit Cygwin environment, the Cygwin mounts are not visible. */
+#if defined __CYGWIN__ || defined __ANDROID__
+/* Omit the directory part because
+ - For 32-bit Cygwin programs in a 64-bit Cygwin environment, the Cygwin
+ mounts are not visible.
+ - On Android, /bin/sh does not exist. It's /system/bin/sh instead. */
# define BOURNE_SHELL "sh"
#else
# define BOURNE_SHELL "/bin/sh"
@@ -1833,10 +1835,13 @@
/* The _Noreturn keyword of C11. */
#ifndef _Noreturn
-# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# if (defined __cplusplus \
+ && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
+ || (defined _MSC_VER && 1900 <= _MSC_VER)))
# define _Noreturn [[noreturn]]
-# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
- || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+# elif ((!defined __cplusplus || defined __clang__) \
+ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)))
/* _Noreturn works as-is. */
# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
@@ -1879,6 +1884,33 @@
/* Define to 1 if the system <stdint.h> predates C++11. */
#undef __STDC_LIMIT_MACROS
+/* The _GL_ASYNC_SAFE marker should be attached to functions that are
+ signal handlers (for signals other than SIGABRT, SIGPIPE) or can be
+ invoked from such signal handlers. Such functions have some restrictions:
+ * All functions that it calls should be marked _GL_ASYNC_SAFE as well,
+ or should be listed as async-signal-safe in POSIX
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
+ section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
+ particular, are NOT async-signal-safe.
+ * All memory locations (variables and struct fields) that these functions
+ access must be marked 'volatile'. This holds for both read and write
+ accesses. Otherwise the compiler might optimize away stores to and
+ reads from such locations that occur in the program, depending on its
+ data flow analysis. For example, when the program contains a loop
+ that is intended to inspect a variable set from within a signal handler
+ while (!signal_occurred)
+ ;
+ the compiler is allowed to transform this into an endless loop if the
+ variable 'signal_occurred' is not declared 'volatile'.
+ Additionally, recall that:
+ * A signal handler should not modify errno (except if it is a handler
+ for a fatal signal and ends by raising the same signal again, thus
+ provoking the termination of the process). If it invokes a function
+ that may clobber errno, it needs to save and restore the value of
+ errno. */
+#define _GL_ASYNC_SAFE
+
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff --git a/src/connect.c b/src/connect.c
index 37dae21..7b0dbbd 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -1,5 +1,6 @@
/* Establishing and handling network connections.
- Copyright (C) 1995-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1995-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -70,7 +71,7 @@ as that of the covered work. */
# endif
#endif /* ENABLE_IPV6 */
-/* Fill SA as per the data in IP and PORT. SA shoult point to struct
+/* Fill SA as per the data in IP and PORT. SA should point to struct
sockaddr_storage if ENABLE_IPV6 is defined, to struct sockaddr_in
otherwise. */
@@ -714,7 +715,7 @@ select_fd (int fd, double maxtime, int wait_for)
return result;
}
-/* Return true iff the connection to the remote site established
+/* Return true if the connection to the remote site established
through SOCK is still open.
Specifically, this function returns true if SOCK is not ready for
@@ -1041,3 +1042,18 @@ fd_close (int fd)
++transport_map_modified_tick;
}
}
+
+void
+connect_cleanup(void)
+{
+ if (transport_map)
+ {
+ hash_table_iterator iter;
+ for (hash_table_iterate (transport_map, &iter); hash_table_iter_next (&iter); )
+ {
+ xfree (iter.value);
+ }
+ hash_table_destroy (transport_map);
+ transport_map = NULL;
+ }
+}
diff --git a/src/connect.h b/src/connect.h
index fec2405..a2673c0 100644
--- a/src/connect.h
+++ b/src/connect.h
@@ -1,5 +1,6 @@
/* Declarations for connect.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -77,5 +78,6 @@ int fd_write (int, char *, int, double);
int fd_peek (int, char *, int, double);
const char *fd_errstr (int);
void fd_close (int);
+void connect_cleanup (void);
#endif /* CONNECT_H */
diff --git a/src/convert.c b/src/convert.c
index 8cacbfb..d712a9c 100644
--- a/src/convert.c
+++ b/src/convert.c
@@ -1,6 +1,6 @@
/* Conversion of links to local files.
- Copyright (C) 2003-2011, 2014-2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2003-2011, 2014-2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
@@ -255,9 +255,9 @@ convert_links (const char *file, struct urlpos *links)
write_backup_file (file, downloaded_file_return);
/* Before opening the file for writing, unlink the file. This is
- important if the data in FM is mmaped. In such case, nulling the
+ important if the data in FM is mapped. In such case, nulling the
file, which is what fopen() below does, would make us read all
- zeroes from the mmaped region. */
+ zeroes from the mapped region. */
if (unlink (file) < 0 && errno != ENOENT)
{
logprintf (LOG_NOTQUIET, _("Unable to delete %s: %s\n"),
diff --git a/src/convert.h b/src/convert.h
index 6f45dfb..ceacf88 100644
--- a/src/convert.h
+++ b/src/convert.h
@@ -1,5 +1,5 @@
/* Declarations for convert.c
- Copyright (C) 2003-2006, 2009-2011, 2015, 2018 Free Software
+ Copyright (C) 2003-2006, 2009-2011, 2015, 2018-2019 Free Software
Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/cookies.c b/src/cookies.c
index ea4c7de..a2eacfc 100644
--- a/src/cookies.c
+++ b/src/cookies.c
@@ -1,5 +1,6 @@
/* Support for cookies.
- Copyright (C) 2001-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -900,7 +901,7 @@ path_matches (const char *full_path, const char *prefix)
return len + 1;
}
-/* Return true iff COOKIE matches the provided parameters of the URL
+/* Return true if COOKIE matches the provided parameters of the URL
being downloaded: HOST, PORT, PATH, and SECFLAG.
If PATH_GOODNESS is non-NULL, store the "path goodness" value
diff --git a/src/cookies.h b/src/cookies.h
index e174798..87aac99 100644
--- a/src/cookies.h
+++ b/src/cookies.h
@@ -1,5 +1,6 @@
/* Support for cookies.
- Copyright (C) 2001-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/css-tokens.h b/src/css-tokens.h
index 109ac29..b2cb976 100644
--- a/src/css-tokens.h
+++ b/src/css-tokens.h
@@ -1,6 +1,6 @@
/* Declarations for css.lex
- Copyright (C) 2006, 2009-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2006, 2009-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/css-url.c b/src/css-url.c
index c4f7761..54909b7 100644
--- a/src/css-url.c
+++ b/src/css-url.c
@@ -1,5 +1,5 @@
/* Collect URLs from CSS source.
- Copyright (C) 1998, 2000-2003, 2009-2011, 2014-2015, 2018 Free
+ Copyright (C) 1998, 2000-2003, 2009-2011, 2014-2015, 2018-2019 Free
Software Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/css-url.h b/src/css-url.h
index 79f1166..abbf723 100644
--- a/src/css-url.h
+++ b/src/css-url.h
@@ -1,6 +1,6 @@
/* Declarations for css-url.c.
- Copyright (C) 2006, 2009-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2006, 2009-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/css.c b/src/css.c
index 68fec94..c07d61c 100644
--- a/src/css.c
+++ b/src/css.c
@@ -1,9 +1,9 @@
-#line 2 "css.c"
+#line 1 "css.c"
/* config.h must precede flex's inclusion of <stdio.h>
in order for its _GNU_SOURCE definition to take effect. */
#include <config.h>
-#line 7 "css.c"
+#line 6 "css.c"
#define YY_INT_ALIGNED short int
@@ -2402,8 +2402,8 @@ char *yytext;
#line 13 "css.l"
/* Lex source for CSS tokenizing.
Taken from http://www.w3.org/TR/CSS21/grammar.html#q2
- Copyright (C) 2006, 2009-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2006, 2009-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
@@ -2449,8 +2449,8 @@ as that of the covered work. */
#endif
#endif
+#line 2452 "css.c"
#line 2453 "css.c"
-#line 2454 "css.c"
#define INITIAL 0
@@ -2668,7 +2668,7 @@ YY_DECL
#line 112 "css.l"
-#line 2672 "css.c"
+#line 2671 "css.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -2958,7 +2958,7 @@ YY_RULE_SETUP
#line 167 "css.l"
ECHO;
YY_BREAK
-#line 2962 "css.c"
+#line 2961 "css.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
diff --git a/src/css.l b/src/css.l
index d6c34f6..d33a603 100644
--- a/src/css.l
+++ b/src/css.l
@@ -12,8 +12,8 @@
%{
/* Lex source for CSS tokenizing.
Taken from http://www.w3.org/TR/CSS21/grammar.html#q2
- Copyright (C) 2006, 2009-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2006, 2009-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/css_.c b/src/css_.c
index 8ca830d..d9e7717 100644
--- a/src/css_.c
+++ b/src/css_.c
@@ -1,10 +1,10 @@
#include "wget.h"
-#line 2 "css.c"
+#line 1 "css.c"
/* config.h must precede flex's inclusion of <stdio.h>
in order for its _GNU_SOURCE definition to take effect. */
#include <config.h>
-#line 7 "css.c"
+#line 6 "css.c"
#define YY_INT_ALIGNED short int
@@ -2403,8 +2403,8 @@ char *yytext;
#line 13 "css.l"
/* Lex source for CSS tokenizing.
Taken from http://www.w3.org/TR/CSS21/grammar.html#q2
- Copyright (C) 2006, 2009-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2006, 2009-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
@@ -2450,8 +2450,8 @@ as that of the covered work. */
#endif
#endif
+#line 2452 "css.c"
#line 2453 "css.c"
-#line 2454 "css.c"
#define INITIAL 0
@@ -2669,7 +2669,7 @@ YY_DECL
#line 112 "css.l"
-#line 2672 "css.c"
+#line 2671 "css.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -2959,7 +2959,7 @@ YY_RULE_SETUP
#line 167 "css.l"
ECHO;
YY_BREAK
-#line 2962 "css.c"
+#line 2961 "css.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
diff --git a/src/exits.c b/src/exits.c
index da2ac3b..319c566 100644
--- a/src/exits.c
+++ b/src/exits.c
@@ -1,5 +1,6 @@
/* Exit status handling.
- Copyright (C) 2009-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/exits.h b/src/exits.h
index bedfdf4..ca2a6fd 100644
--- a/src/exits.h
+++ b/src/exits.h
@@ -1,5 +1,6 @@
/* Exit status related declarations.
- Copyright (C) 2009-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/ftp-basic.c b/src/ftp-basic.c
index bc129f6..3f77f37 100644
--- a/src/ftp-basic.c
+++ b/src/ftp-basic.c
@@ -1,6 +1,6 @@
/* Basic FTP routines.
- Copyright (C) 1996-2011, 2014-2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 1996-2011, 2014-2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
@@ -904,7 +904,7 @@ ftp_epsv (int csock, ip_address *ip, int *port)
for (tport = 0, i = 0; i < 5 && c_isdigit (*s); i++, s++)
tport = (*s - '0') + 10 * tport;
- /* Make sure that the response terminates correcty */
+ /* Make sure that the response terminates correctly */
if (*s++ != delim)
{
xfree (respline);
diff --git a/src/ftp-ls.c b/src/ftp-ls.c
index d92e59b..83730c2 100644
--- a/src/ftp-ls.c
+++ b/src/ftp-ls.c
@@ -1,5 +1,6 @@
/* Parsing FTP `ls' output.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -856,8 +857,7 @@ ftp_parse_vms_ls (FILE *fp)
{
/* Date. */
DEBUGP (("Date.\n"));
- strcpy( date_str, tok);
- strcat( date_str, " ");
+ snprintf(date_str, sizeof(date_str), "%s ", tok);
}
else if ((strlen (tok) < 12) && (strchr( tok, ':') != NULL))
{
@@ -994,7 +994,7 @@ ftp_parse_vms_ls (FILE *fp)
/* This function switches between the correct parsing routine depending on
the SYSTEM_TYPE. The system type should be based on the result of the
- "SYST" response of the FTP server. According to this repsonse we will
+ "SYST" response of the FTP server. According to this response we will
use on of the three different listing parsers that cover the most of FTP
servers used nowadays. */
diff --git a/src/ftp-opie.c b/src/ftp-opie.c
index ffd048b..fdfaf40 100644
--- a/src/ftp-opie.c
+++ b/src/ftp-opie.c
@@ -1,5 +1,6 @@
/* Opie (s/key) support for FTP.
- Copyright (C) 1998-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/ftp.c b/src/ftp.c
index 6b8bdf8..03d7deb 100644
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -1,6 +1,6 @@
/* File Transfer Protocol support.
- Copyright (C) 1996-2011, 2014-2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 1996-2011, 2014-2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/ftp.h b/src/ftp.h
index 8f7c4c1..2144962 100644
--- a/src/ftp.h
+++ b/src/ftp.h
@@ -1,5 +1,6 @@
/* Declarations for FTP support.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/gnutls.c b/src/gnutls.c
index a2c9d1c..04b50b1 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1,5 +1,6 @@
/* SSL support via GnuTLS library.
- Copyright (C) 2005-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -784,7 +785,7 @@ ssl_connect_wget (int fd, const char *hostname, int *continue_session)
err = gnutls_priority_set_direct (session, opt.tls_ciphers_string, NULL);
#else
logprintf (LOG_NOTQUIET, _("GnuTLS: Cannot set prio string directly. Falling back to default priority.\n"));
- err = gnutls_set_default_priority ();
+ err = gnutls_set_default_priority (session);
#endif
}
diff --git a/src/hash.c b/src/hash.c
index 5e48fc7..04cc5f5 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -1,5 +1,6 @@
/* Hash tables.
- Copyright (C) 2000-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -199,7 +200,7 @@ struct hash_table {
being HASHFUN. */
#define HASH_POSITION(key, hashfun, size) ((hashfun) (key) % size)
-/* Find a prime near, but greather than or equal to SIZE. The primes
+/* Find a prime near, but greater than or equal to SIZE. The primes
are looked up from a table with a selection of primes convenient
for this purpose.
diff --git a/src/hash.h b/src/hash.h
index ae0e8e4..c5bb002 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -1,6 +1,6 @@
/* Hash table declarations.
- Copyright (C) 2000, 2007-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2000, 2007-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/host.c b/src/host.c
index 2bf848f..e4f0ffb 100644
--- a/src/host.c
+++ b/src/host.c
@@ -1,5 +1,6 @@
/* Host name resolution and matching.
- Copyright (C) 1996-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/host.h b/src/host.h
index 042d44d..560391d 100644
--- a/src/host.h
+++ b/src/host.h
@@ -1,5 +1,6 @@
/* Declarations for host.c
- Copyright (C) 1996-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/hsts.c b/src/hsts.c
index 64149e4..b91bc56 100644
--- a/src/hsts.c
+++ b/src/hsts.c
@@ -1,5 +1,6 @@
/* HTTP Strict Transport Security (HSTS) support.
- Copyright (C) 1996-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/hsts.h b/src/hsts.h
index 0065d9f..a92b023 100644
--- a/src/hsts.h
+++ b/src/hsts.h
@@ -1,5 +1,6 @@
/* Declarations for hsts.c
- Copyright (C) 1996-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/html-parse.c b/src/html-parse.c
index 658f90f..da8fd76 100644
--- a/src/html-parse.c
+++ b/src/html-parse.c
@@ -1,5 +1,6 @@
/* HTML parser for Wget.
- Copyright (C) 1998-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/html-parse.h b/src/html-parse.h
index 567afcd..1f0ea6e 100644
--- a/src/html-parse.h
+++ b/src/html-parse.h
@@ -1,5 +1,6 @@
/* Declarations for html-parse.c.
- Copyright (C) 1998-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/html-url.c b/src/html-url.c
index 9691526..2f95357 100644
--- a/src/html-url.c
+++ b/src/html-url.c
@@ -1,5 +1,6 @@
/* Collect URLs from HTML source.
- Copyright (C) 1998-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -836,7 +837,11 @@ get_urls_html_fm (const char *file, const struct file_memory *fm,
#endif
xfree (meta_charset);
+ if (ctx.nofollow) {
+ logprintf(LOG_VERBOSE, _("no-follow attribute found in %s. Will not follow any links on this page\n"), file);
+ }
DEBUGP (("no-follow in %s: %d\n", file, ctx.nofollow));
+
if (meta_disallow_follow)
*meta_disallow_follow = ctx.nofollow;
diff --git a/src/html-url.h b/src/html-url.h
index 6eaf360..33ea4cf 100644
--- a/src/html-url.h
+++ b/src/html-url.h
@@ -1,5 +1,5 @@
/* Declarations for html-url.c.
- Copyright (C) 1995-1997, 2009-2011, 2015, 2018 Free Software
+ Copyright (C) 1995-1997, 2009-2011, 2015, 2018-2019 Free Software
Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/http-ntlm.c b/src/http-ntlm.c
index a614fba..240fa5d 100644
--- a/src/http-ntlm.c
+++ b/src/http-ntlm.c
@@ -1,5 +1,6 @@
/* NTLM code.
- Copyright (C) 2005-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
Contributed by Daniel Stenberg.
This file is part of GNU Wget.
@@ -135,13 +136,24 @@ ntlm_input (struct ntlmdata *ntlm, const char *header)
}
else
{
- if (ntlm->state >= NTLMSTATE_TYPE1)
+ if (ntlm->state == NTLMSTATE_LAST)
+ {
+ DEBUGP (("NTLM auth restarted.\n"));
+ /* no return, continue */
+ }
+ else if (ntlm->state == NTLMSTATE_TYPE3)
+ {
+ DEBUGP (("NTLM handshake rejected.\n"));
+ ntlm->state = NTLMSTATE_NONE;
+ return false;
+ }
+ else if (ntlm->state >= NTLMSTATE_TYPE1)
{
DEBUGP (("Unexpected empty NTLM message.\n"));
return false; /* this is an error */
}
- DEBUGP (("Empty NTLM message, starting transaction.\n"));
+ DEBUGP (("Empty NTLM message, (re)starting transaction.\n"));
ntlm->state = NTLMSTATE_TYPE1; /* we should sent away a type-1 */
}
diff --git a/src/http-ntlm.h b/src/http-ntlm.h
index 39a23b5..895d5e3 100644
--- a/src/http-ntlm.h
+++ b/src/http-ntlm.h
@@ -1,8 +1,8 @@
#ifndef __HTTP_NTLM_H
#define __HTTP_NTLM_H
/* Declarations for http_ntlm.c
- Copyright (C) 1995-1997, 2000, 2007-2011, 2015, 2018 Free Software
- Foundation, Inc.
+ Copyright (C) 1995-1997, 2000, 2007-2011, 2015, 2018-2019 Free
+ Software Foundation, Inc.
Contributed by Daniel Stenberg.
This file is part of GNU Wget.
diff --git a/src/http.c b/src/http.c
index a01fc57..289d110 100644
--- a/src/http.c
+++ b/src/http.c
@@ -1,6 +1,6 @@
/* HTTP support.
- Copyright (C) 1996-2012, 2014-2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 1996-2012, 2014-2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
@@ -388,7 +388,7 @@ request_send (const struct request *req, int fd, FILE *warc_tmp)
}
/* Release the resources used by REQ.
- It is safe to call it with a vaild pointer to a NULL pointer.
+ It is safe to call it with a valid pointer to a NULL pointer.
It is not safe to call it with an invalid or NULL pointer. */
static void
@@ -553,7 +553,7 @@ response_head_terminator (const char *start, const char *peeked, int peeklen)
return p + 2;
}
/* p==end-2: check for \n\n directly preceding END. */
- if (p[0] == '\n' && p[1] == '\n')
+ if (peeklen >= 2 && p[0] == '\n' && p[1] == '\n')
return p + 2;
return NULL;
@@ -1077,7 +1077,7 @@ modify_param_name (param_token *name)
return result;
}
-/* extract_param extract the paramater value into VALUE.
+/* extract_param extract the parameter value into VALUE.
Like modify_param_name this function modifies VALUE by
stripping off the encoding information from the actual value
*/
@@ -1355,7 +1355,7 @@ static struct {
char *host;
int port;
- /* Whether a ssl handshake has occoured on this connection. */
+ /* Whether a ssl handshake has occurred on this connection. */
bool ssl;
/* Whether the connection was authorized. This is only done by
@@ -5365,8 +5365,8 @@ test_parse_content_disposition (void)
{ "attachment; filename=\"file.ext\"", "file.ext", true },
{ "attachment; filename=\"file.ext\"; dummy", "file.ext", true },
{ "attachment", NULL, false },
- { "attachement; filename*=UTF-8'en-US'hello.txt", "hello.txt", true },
- { "attachement; filename*0=\"hello\"; filename*1=\"world.txt\"",
+ { "attachment; filename*=UTF-8'en-US'hello.txt", "hello.txt", true },
+ { "attachment; filename*0=\"hello\"; filename*1=\"world.txt\"",
"helloworld.txt", true },
{ "attachment; filename=\"A.ext\"; filename*=\"B.ext\"", "B.ext", true },
{ "attachment; filename*=\"A.ext\"; filename*0=\"B\"; filename*1=\"B.ext\"",
diff --git a/src/http.h b/src/http.h
index f9ab352..d6b22ea 100644
--- a/src/http.h
+++ b/src/http.h
@@ -1,5 +1,6 @@
/* Declarations for HTTP.
- Copyright (C) 2005-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/init.c b/src/init.c
index 51b6361..9b6665a 100644
--- a/src/init.c
+++ b/src/init.c
@@ -1,6 +1,6 @@
/* Reading/parsing the initialization file.
- Copyright (C) 1996-2012, 2014-2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 1996-2012, 2014-2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
@@ -2005,7 +2005,9 @@ cleanup (void)
xfree (opt.encoding_remote);
xfree (opt.locale);
+#ifdef HAVE_HSTS
xfree (opt.hsts_file);
+#endif
xfree (opt.wgetrcfile);
xfree (opt.homedir);
diff --git a/src/init.h b/src/init.h
index 146769e..2ec8dde 100644
--- a/src/init.h
+++ b/src/init.h
@@ -1,5 +1,6 @@
/* Declarations for init.c.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/iri.c b/src/iri.c
index 7dcf3ac..7a4097c 100644
--- a/src/iri.c
+++ b/src/iri.c
@@ -1,5 +1,6 @@
/* IRI related functions.
- Copyright (C) 2008-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/iri.h b/src/iri.h
index 7ca3419..50e6142 100644
--- a/src/iri.h
+++ b/src/iri.h
@@ -1,5 +1,6 @@
/* Internationalization related declarations.
- Copyright (C) 2008-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/log.c b/src/log.c
index e8cca2f..63b96c8 100644
--- a/src/log.c
+++ b/src/log.c
@@ -1,5 +1,6 @@
/* Messages logging.
- Copyright (C) 1998-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/log.h b/src/log.h
index e8bd065..e298f5c 100644
--- a/src/log.h
+++ b/src/log.h
@@ -1,5 +1,6 @@
/* Declarations for log.c.
- Copyright (C) 1998-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/main.c b/src/main.c
index 4408ffb..65b7f3f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,5 @@
/* Command line parsing.
- Copyright (C) 1996-2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015, 2018-2019 Free Software Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/metalink.c b/src/metalink.c
index 47c8acc..72f7d1b 100644
--- a/src/metalink.c
+++ b/src/metalink.c
@@ -1,5 +1,5 @@
/* Metalink module.
- Copyright (C) 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2015, 2018-2019 Free Software Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/metalink.h b/src/metalink.h
index 00ff4c4..694db84 100644
--- a/src/metalink.h
+++ b/src/metalink.h
@@ -1,5 +1,5 @@
/* Declarations for metalink.c.
- Copyright (C) 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2015, 2018-2019 Free Software Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/mswindows.c b/src/mswindows.c
index 5be3ed8..933d18f 100644
--- a/src/mswindows.c
+++ b/src/mswindows.c
@@ -1,6 +1,6 @@
/* mswindows.c -- Windows-specific support
- Copyright (C) 1996-2011, 2014-2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 1996-2011, 2014-2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/mswindows.h b/src/mswindows.h
index 17f647f..f43d745 100644
--- a/src/mswindows.h
+++ b/src/mswindows.h
@@ -1,5 +1,6 @@
/* Declarations for windows
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -48,7 +49,7 @@ as that of the covered work. */
# define EAI_SYSTEM -1 /* value doesn't matter */
#endif
-/* Declares file access functions, such as open, creat, access, and
+/* Declares file access functions, such as open, create, access, and
chmod. Unix declares these in unistd.h and fcntl.h. */
#include <io.h>
diff --git a/src/netrc.c b/src/netrc.c
index 15a79a1..e38a828 100644
--- a/src/netrc.c
+++ b/src/netrc.c
@@ -1,6 +1,6 @@
/* Read and parse the .netrc file to get hosts, accounts, and passwords.
- Copyright (C) 1996, 2007-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 1996, 2007-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/netrc.h b/src/netrc.h
index d7fcc64..43f9410 100644
--- a/src/netrc.h
+++ b/src/netrc.h
@@ -1,6 +1,6 @@
/* Declarations for netrc.c
- Copyright (C) 1996, 1996-1997, 2007-2011, 2015, 2018 Free Software
- Foundation, Inc.
+ Copyright (C) 1996, 1996-1997, 2007-2011, 2015, 2018-2019 Free
+ Software Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/openssl.c b/src/openssl.c
index 73e7f0f..a6fec5b 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -1,5 +1,6 @@
/* SSL support via OpenSSL library.
- Copyright (C) 2000-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
Originally contributed by Christian Fraenkel.
This file is part of GNU Wget.
@@ -327,6 +328,35 @@ ssl_init (void)
SSL_CTX_set_default_verify_paths (ssl_ctx);
SSL_CTX_load_verify_locations (ssl_ctx, opt.ca_cert, opt.ca_directory);
+ /* Set X509_V_FLAG_PARTIAL_CHAIN to allow the client to anchor trust in
+ * a non-self-signed certificate. This defies RFC 4158 (Path Building)
+ * which defines a trust anchor in terms of a self-signed certificate.
+ * However, it substantially reduces attack surface by pruning the tree
+ * of unneeded trust points. For example, the cross-certified
+ * Let's Encrypt X3 CA, which protects gnu.org and appears as an
+ * intermediate CA to clients, can be used as a trust anchor without
+ * the entire IdentTrust PKI.
+ */
+ X509_VERIFY_PARAM *param = X509_VERIFY_PARAM_new();
+ if (param)
+ {
+ /* We only want X509_V_FLAG_PARTIAL_CHAIN, but the OpenSSL docs
+ * say to use X509_V_FLAG_TRUSTED_FIRST also. It looks like
+ * X509_V_FLAG_TRUSTED_FIRST applies to a collection of trust
+ * anchors and not a single trust anchor.
+ */
+ (void) X509_VERIFY_PARAM_set_flags (param, X509_V_FLAG_TRUSTED_FIRST | X509_V_FLAG_PARTIAL_CHAIN);
+ if (SSL_CTX_set1_param (ssl_ctx, param) == 0)
+ logprintf(LOG_NOTQUIET, _("OpenSSL: Failed set trust to partial chain\n"));
+ /* We continue on error */
+ X509_VERIFY_PARAM_free (param);
+ }
+ else
+ {
+ logprintf(LOG_NOTQUIET, _("OpenSSL: Failed to allocate verification param\n"));
+ /* We continue on error */
+ }
+
if (opt.crl_file)
{
X509_STORE *store = SSL_CTX_get_cert_store (ssl_ctx);
diff --git a/src/options.h b/src/options.h
index c3c2a2c..881e2b2 100644
--- a/src/options.h
+++ b/src/options.h
@@ -1,5 +1,6 @@
/* struct options.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/progress.c b/src/progress.c
index 3d8ba53..8e5709c 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -1,5 +1,6 @@
/* Download progress.
- Copyright (C) 2001-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -736,7 +737,7 @@ update_speed_ring (struct bar_progress *bp, wgint howmuch, double dltime)
if (bp->stalled)
{
bp->stalled = false;
- /* "recent_age" includes the entired stalled period, which
+ /* "recent_age" includes the entire stalled period, which
could be very long. Don't update the speed ring with that
value because the current bandwidth would start too small.
Start with an arbitrary (but more reasonable) time value and
diff --git a/src/progress.h b/src/progress.h
index ffd3afe..e650371 100644
--- a/src/progress.h
+++ b/src/progress.h
@@ -1,5 +1,6 @@
/* Download progress.
- Copyright (C) 2001-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/ptimer.c b/src/ptimer.c
index 860d058..00a64e5 100644
--- a/src/ptimer.c
+++ b/src/ptimer.c
@@ -1,5 +1,6 @@
/* Portable timers.
- Copyright (C) 2005-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/ptimer.h b/src/ptimer.h
index e7d23d2..1d6187c 100644
--- a/src/ptimer.h
+++ b/src/ptimer.h
@@ -1,5 +1,6 @@
/* Declarations for ptimer.c.
- Copyright (C) 2005-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/recur.c b/src/recur.c
index 0a173dd..b319048 100644
--- a/src/recur.c
+++ b/src/recur.c
@@ -1,5 +1,6 @@
/* Handling of recursive HTTP retrieving.
- Copyright (C) 1996-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/recur.h b/src/recur.h
index 1c56811..f2b9b6d 100644
--- a/src/recur.h
+++ b/src/recur.h
@@ -1,5 +1,6 @@
/* Declarations for recur.c.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/res.c b/src/res.c
index 0062c63..f828111 100644
--- a/src/res.c
+++ b/src/res.c
@@ -1,6 +1,6 @@
/* Support for Robot Exclusion Standard (RES).
- Copyright (C) 2001, 2006-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2001, 2006-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of Wget.
diff --git a/src/res.h b/src/res.h
index e8fb934..a4bd650 100644
--- a/src/res.h
+++ b/src/res.h
@@ -1,6 +1,6 @@
/* Declarations for res.c.
- Copyright (C) 2001, 2007-2011, 2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 2001, 2007-2011, 2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of Wget.
diff --git a/src/retr.c b/src/retr.c
index ae86730..ebea6e4 100644
--- a/src/retr.c
+++ b/src/retr.c
@@ -1,6 +1,6 @@
/* File retrieval.
- Copyright (C) 1996-2011, 2014-2015, 2018 Free Software Foundation,
- Inc.
+ Copyright (C) 1996-2011, 2014-2015, 2018-2019 Free Software
+ Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/retr.h b/src/retr.h
index dcae7b1..730d8b3 100644
--- a/src/retr.h
+++ b/src/retr.h
@@ -1,5 +1,6 @@
/* Declarations for retr.c.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/spider.c b/src/spider.c
index f34cf17..df80c14 100644
--- a/src/spider.c
+++ b/src/spider.c
@@ -1,6 +1,5 @@
/* Keep track of visited URLs in spider mode.
- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2015 Free Software
- Foundation, Inc.
+ Copyright (C) 2006-2011, 2015, 2019 Free Software Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/spider.h b/src/spider.h
index fdec3d7..d515e8f 100644
--- a/src/spider.h
+++ b/src/spider.h
@@ -1,6 +1,5 @@
/* Declarations for spider.c
- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2015 Free Software
- Foundation, Inc.
+ Copyright (C) 2006-2011, 2015, 2019 Free Software Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/ssl.h b/src/ssl.h
index a44bd08..e0c7766 100644
--- a/src/ssl.h
+++ b/src/ssl.h
@@ -1,5 +1,6 @@
/* SSL support.
- Copyright (C) 2000-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
Originally contributed by Christian Fraenkel.
This file is part of GNU Wget.
diff --git a/src/sysdep.h b/src/sysdep.h
index bfeadf3..c17fa01 100644
--- a/src/sysdep.h
+++ b/src/sysdep.h
@@ -1,5 +1,6 @@
/* Dirty system-dependent hacks.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/url.c b/src/url.c
index 4b2263c..2c49023 100644
--- a/src/url.c
+++ b/src/url.c
@@ -1,5 +1,6 @@
/* URL handling.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/url.h b/src/url.h
index fb66a76..c672f1c 100644
--- a/src/url.h
+++ b/src/url.h
@@ -1,5 +1,6 @@
/* Declarations for url.c.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/utils.c b/src/utils.c
index 2289a47..89a87b0 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,5 +1,6 @@
/* Various utility functions.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -616,7 +617,7 @@ file_non_directory_p (const char *path)
}
/* Return the size of file named by FILENAME, or -1 if it cannot be
- opened or seeked into. */
+ opened or sought into. */
wgint
file_size (const char *filename)
{
diff --git a/src/utils.h b/src/utils.h
index 7c0e767..3cffd2a 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,5 +1,6 @@
/* Declarations for utils.c.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
diff --git a/src/version.h b/src/version.h
index ee40bb1..95ae78a 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,5 +1,5 @@
/* Extern declarations for printing version information
- Copyright (C) 2013, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2013, 2015, 2018-2019 Free Software Foundation, Inc.
This file is part of GNU Wget.
diff --git a/src/warc.c b/src/warc.c
index 2eb7496..74c8ad9 100644
--- a/src/warc.c
+++ b/src/warc.c
@@ -1,5 +1,6 @@
/* Utility functions for writing WARC files.
- Copyright (C) 2011-2012, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -490,7 +491,7 @@ warc_sha1_stream_with_payload (FILE *stream, void *res_block, void *res_payload,
if (n == 0)
{
- /* Check for the error flag IFF N == 0, so that we don't
+ /* Check for the error flag IF N == 0, so that we don't
exit the loop after a partial read due to e.g., EAGAIN
or EWOULDBLOCK. */
if (ferror (stream))
diff --git a/src/wget.h b/src/wget.h
index 0210659..8543833 100644
--- a/src/wget.h
+++ b/src/wget.h
@@ -1,5 +1,6 @@
/* Miscellaneous declarations.
- Copyright (C) 1996-2011, 2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2011, 2015, 2018-2019 Free Software Foundation,
+ Inc.
This file is part of GNU Wget.
@@ -209,6 +210,9 @@ typedef double SUM_SIZE_INT;
/* Everything uses this, so include them here directly. */
#include <alloca.h>
+#ifdef __cplusplus
+# undef _Noreturn
+#endif
#include "xalloc.h"
/* Likewise for logging functions. */
@@ -329,7 +333,7 @@ enum
or application/xhtml+xml */
RETROKF = 0x0002, /* retrieval was OK */
HEAD_ONLY = 0x0004, /* only send the HEAD request */
- SEND_NOCACHE = 0x0008, /* send Pragma: no-cache directive */
+ SEND_NOCACHE = 0x0008, /* send Cache-Control: no-cache and Pragma: no-cache directive */
ACCEPTRANGES = 0x0010, /* Accept-ranges header was found */
ADDED_HTML_EXTENSION = 0x0020, /* added ".html" extension due to -E */
TEXTCSS = 0x0040, /* document is of type text/css */
diff --git a/src/xattr.c b/src/xattr.c
index 0f20fad..05e902d 100644
--- a/src/xattr.c
+++ b/src/xattr.c
@@ -1,6 +1,6 @@
/* xattr.h -- POSIX Extended Attribute support.
- Copyright (C) 2016, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2016, 2018-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/xattr.h b/src/xattr.h
index 40c7a8d..bbe0fe4 100644
--- a/src/xattr.h
+++ b/src/xattr.h
@@ -1,6 +1,6 @@
/* xattr.h -- POSIX Extended Attribute function mappings.
- Copyright (C) 2016, 2018 Free Software Foundation, Inc.
+ Copyright (C) 2016, 2018-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by