mirror of
https://github.com/mirror/wget.git
synced 2025-04-02 15:40:12 +08:00
[mq]: cfg-mk
This commit is contained in:
parent
73ff253e37
commit
4a08094db8
1
.x-sc_po_check
Normal file
1
.x-sc_po_check
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/wget.h
|
9
.x-sc_trailing_blank
Normal file
9
.x-sc_trailing_blank
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
doc/wget.texi
|
||||||
|
po/bg.po
|
||||||
|
ChangeLog
|
||||||
|
doc/ChangeLog
|
||||||
|
src/ChangeLog
|
||||||
|
windows/ChangeLog
|
||||||
|
msdos/ChangeLog
|
||||||
|
tests/ChangeLog
|
||||||
|
build-aux/texinfo.tex
|
@ -1,5 +1,9 @@
|
|||||||
2009-09-21 Micah Cowan <micah@cowan.name>
|
2009-09-21 Micah Cowan <micah@cowan.name>
|
||||||
|
|
||||||
|
* vms/VMS-WGET.COM: "the the" -> "the".
|
||||||
|
|
||||||
|
* po/POTFILES.in: Removed some files that are not using gettext.
|
||||||
|
|
||||||
* po/*.po: Updated from translationproject.org.
|
* po/*.po: Updated from translationproject.org.
|
||||||
|
|
||||||
2009-09-20 Micah Cowan <micah@cowan.name>
|
2009-09-20 Micah Cowan <micah@cowan.name>
|
||||||
|
@ -2,7 +2,7 @@ Please note that Wget has more than one ChangeLog file:
|
|||||||
|
|
||||||
./ChangeLog: documents changes to files in the top-level directory
|
./ChangeLog: documents changes to files in the top-level directory
|
||||||
and to files in subdirectories like po/ that don't have
|
and to files in subdirectories like po/ that don't have
|
||||||
their own ChangeLogs
|
their own ChangeLogs
|
||||||
|
|
||||||
src/ChangeLog: documents only changes to files in the src directory
|
src/ChangeLog: documents only changes to files in the src directory
|
||||||
|
|
||||||
|
4
NEWS
4
NEWS
@ -40,7 +40,7 @@ support alternative default names for index.html.
|
|||||||
|
|
||||||
** --ask-password option (and associated wgetrc command) added to
|
** --ask-password option (and associated wgetrc command) added to
|
||||||
support password prompts at the console.
|
support password prompts at the console.
|
||||||
|
|
||||||
** The --input-file option now also handles retrieving links from
|
** The --input-file option now also handles retrieving links from
|
||||||
an external file.
|
an external file.
|
||||||
|
|
||||||
@ -489,7 +489,7 @@ passive_ftp is the only .wgetrc command which takes a lockable Boolean.
|
|||||||
|
|
||||||
** A number of new translation files have been added.
|
** A number of new translation files have been added.
|
||||||
|
|
||||||
** New --bind-address / bind_address = <address> option for people on hosts
|
** New --bind-address / bind_address = <address> option for people on hosts
|
||||||
bound to multiple IP addresses.
|
bound to multiple IP addresses.
|
||||||
|
|
||||||
** wget now accepts (illegal per HTTP spec) relative URLs in HTTP redirects.
|
** wget now accepts (illegal per HTTP spec) relative URLs in HTTP redirects.
|
||||||
|
28
cfg.mk
28
cfg.mk
@ -1 +1,29 @@
|
|||||||
|
export VC_LIST_EXCEPT_DEFAULT=^(lib/.*|m4/.*|md5/.*|build-aux/.*|src/gettext\.h|.*ChangeLog)$$
|
||||||
|
|
||||||
|
local-checks-to-skip = \
|
||||||
|
sc_const_long_option \
|
||||||
|
sc_error_message_uppercase \
|
||||||
|
sc_file_system \
|
||||||
|
sc_makefile_TAB_only_indentation \
|
||||||
|
sc_immutable_NEWS \
|
||||||
|
sc_copyright_check \
|
||||||
|
sc_makefile_path_separator_check \
|
||||||
|
sc_require_config_h \
|
||||||
|
sc_require_config_h_first \
|
||||||
|
sc_two_space_separator_in_usage \
|
||||||
|
sc_useless_cpp_parens \
|
||||||
|
\
|
||||||
|
sc_space_tab \
|
||||||
|
sc_prohibit_atoi_atof \
|
||||||
|
sc_prohibit_strcmp \
|
||||||
|
sc_makefile_check \
|
||||||
|
sc_cast_of_alloca_return_value \
|
||||||
|
sc_cast_of_x_alloc_return_value \
|
||||||
|
sc_prohibit_S_IS_definition \
|
||||||
|
\
|
||||||
|
sc_program_name \
|
||||||
|
|
||||||
|
|
||||||
|
#SHELL=bash -x
|
||||||
|
show-vc-list-except:
|
||||||
|
@$(VC_LIST_EXCEPT)
|
||||||
|
@ -30,7 +30,7 @@ dnl
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_INIT([wget],
|
AC_INIT([wget],
|
||||||
[1.12-devel],
|
[1.12-devel],
|
||||||
[bug-wget@gnu.org])
|
[bug-wget@gnu.org])
|
||||||
AC_PREREQ(2.61)
|
AC_PREREQ(2.61)
|
||||||
@ -537,7 +537,7 @@ if test "X$iri" != "Xno"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "X$iri" != "Xno" ; then
|
if test "X$iri" != "Xno" ; then
|
||||||
AC_DEFINE(ENABLE_IRI, 1, [Define if IRI support is enabled.])
|
AC_DEFINE([ENABLE_IRI], 1, [Define if IRI support is enabled.])
|
||||||
AC_MSG_NOTICE([Enabling support for IRI.])
|
AC_MSG_NOTICE([Enabling support for IRI.])
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([Libidn not found])
|
AC_MSG_WARN([Libidn not found])
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
## avoid having to type many many command-line options. This file does
|
## avoid having to type many many command-line options. This file does
|
||||||
## not contain a comprehensive list of commands -- look at the manual
|
## not contain a comprehensive list of commands -- look at the manual
|
||||||
## to find out what you can put into this file.
|
## to find out what you can put into this file.
|
||||||
##
|
##
|
||||||
## Wget initialization file can reside in /usr/local/etc/wgetrc
|
## Wget initialization file can reside in /usr/local/etc/wgetrc
|
||||||
## (global, for all users) or $HOME/.wgetrc (for a single user).
|
## (global, for all users) or $HOME/.wgetrc (for a single user).
|
||||||
##
|
##
|
||||||
|
@ -231,7 +231,7 @@ while(<$inf>) {
|
|||||||
$file = postprocess($1);
|
$file = postprocess($1);
|
||||||
|
|
||||||
# Try cwd and $ibase.
|
# Try cwd and $ibase.
|
||||||
open($inf, "<" . $file)
|
open($inf, "<" . $file)
|
||||||
or open($inf, "<" . $ibase . "/" . $file)
|
or open($inf, "<" . $ibase . "/" . $file)
|
||||||
or die "cannot open $file or $ibase/$file: $!\n";
|
or die "cannot open $file or $ibase/$file: $!\n";
|
||||||
next;
|
next;
|
||||||
|
@ -165,7 +165,7 @@ AC_DEFUN([TYPE_STRUCT_SOCKADDR_IN6],[
|
|||||||
|
|
||||||
AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[
|
AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[
|
||||||
AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6])
|
AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6])
|
||||||
|
|
||||||
wget_member_sin6_scope_id=
|
wget_member_sin6_scope_id=
|
||||||
if test "X$wget_have_sockaddr_in6" = "Xyes"; then
|
if test "X$wget_have_sockaddr_in6" = "Xyes"; then
|
||||||
AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],[
|
AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],[
|
||||||
|
@ -7,19 +7,13 @@ lib/error.c
|
|||||||
lib/getopt.c
|
lib/getopt.c
|
||||||
lib/quotearg.c
|
lib/quotearg.c
|
||||||
lib/xalloc-die.c
|
lib/xalloc-die.c
|
||||||
src/cmpt.c
|
|
||||||
src/connect.c
|
src/connect.c
|
||||||
src/convert.c
|
src/convert.c
|
||||||
src/cookies.c
|
src/cookies.c
|
||||||
src/ftp-basic.c
|
|
||||||
src/ftp-ls.c
|
src/ftp-ls.c
|
||||||
src/ftp-opie.c
|
|
||||||
src/ftp.c
|
src/ftp.c
|
||||||
src/gen-md5.c
|
|
||||||
src/gnutls.c
|
src/gnutls.c
|
||||||
src/hash.c
|
|
||||||
src/host.c
|
src/host.c
|
||||||
src/html-parse.c
|
|
||||||
src/html-url.c
|
src/html-url.c
|
||||||
src/http.c
|
src/http.c
|
||||||
src/init.c
|
src/init.c
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2009-09-21 Micah Cowan <micah@cowan.name>
|
||||||
|
|
||||||
|
* progress.c (update_speed_ring): "the the" -> "the".
|
||||||
|
|
||||||
|
* css-url.c, iri.c, mswindows.c: Removed assert.h inclusion (not
|
||||||
|
using it).
|
||||||
|
|
||||||
2009-09-11 Steven Schweda <sms@antinode.info>
|
2009-09-11 Steven Schweda <sms@antinode.info>
|
||||||
|
|
||||||
* utils.c, utils.h (fopen_excl): Make second argument an int,
|
* utils.c, utils.h (fopen_excl): Make second argument an int,
|
||||||
|
@ -312,7 +312,7 @@ connect_to_ip (const ip_address *ip, int port, const char *print)
|
|||||||
/* In case of error, we will go on anyway... */
|
/* In case of error, we will go on anyway... */
|
||||||
int err = setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof (on));
|
int err = setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof (on));
|
||||||
IF_DEBUG
|
IF_DEBUG
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
DEBUGP (("Failed setting IPV6_V6ONLY: %s", strerror (errno)));
|
DEBUGP (("Failed setting IPV6_V6ONLY: %s", strerror (errno)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -918,7 +918,7 @@ static struct hash_table *downloaded_files_hash;
|
|||||||
However, our hash tables only accept pointers for keys and values.
|
However, our hash tables only accept pointers for keys and values.
|
||||||
So when we need a pointer, we use the address of a
|
So when we need a pointer, we use the address of a
|
||||||
downloaded_file_t variable of static storage. */
|
downloaded_file_t variable of static storage. */
|
||||||
|
|
||||||
static downloaded_file_t *
|
static downloaded_file_t *
|
||||||
downloaded_mode_to_ptr (downloaded_file_t mode)
|
downloaded_mode_to_ptr (downloaded_file_t mode)
|
||||||
{
|
{
|
||||||
|
@ -441,7 +441,7 @@ parse_set_cookie (const char *set_cookie, bool silent)
|
|||||||
if (!silent)
|
if (!silent)
|
||||||
logprintf (LOG_NOTQUIET,
|
logprintf (LOG_NOTQUIET,
|
||||||
_("Syntax error in Set-Cookie: %s at position %d.\n"),
|
_("Syntax error in Set-Cookie: %s at position %d.\n"),
|
||||||
quotearg_style (escape_quoting_style, set_cookie),
|
quotearg_style (escape_quoting_style, set_cookie),
|
||||||
(int) (ptr - set_cookie));
|
(int) (ptr - set_cookie));
|
||||||
delete_cookie (cookie);
|
delete_cookie (cookie);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -684,7 +684,7 @@ cookie_handle_set_cookie (struct cookie_jar *jar,
|
|||||||
{
|
{
|
||||||
logprintf (LOG_NOTQUIET,
|
logprintf (LOG_NOTQUIET,
|
||||||
_("Cookie coming from %s attempted to set domain to %s\n"),
|
_("Cookie coming from %s attempted to set domain to %s\n"),
|
||||||
quotearg_style (escape_quoting_style, host),
|
quotearg_style (escape_quoting_style, host),
|
||||||
quotearg_style (escape_quoting_style, cookie->domain));
|
quotearg_style (escape_quoting_style, cookie->domain));
|
||||||
xfree (cookie->domain);
|
xfree (cookie->domain);
|
||||||
goto copy_domain;
|
goto copy_domain;
|
||||||
@ -733,7 +733,7 @@ cookie_handle_set_cookie (struct cookie_jar *jar,
|
|||||||
/* Support for sending out cookies in HTTP requests, based on
|
/* Support for sending out cookies in HTTP requests, based on
|
||||||
previously stored cookies. Entry point is
|
previously stored cookies. Entry point is
|
||||||
`build_cookies_request'. */
|
`build_cookies_request'. */
|
||||||
|
|
||||||
/* Return a count of how many times CHR occurs in STRING. */
|
/* Return a count of how many times CHR occurs in STRING. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -49,7 +49,6 @@ as that of the covered work. */
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "wget.h"
|
#include "wget.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
@ -144,7 +143,7 @@ get_uri_string (const char *at, int *pos, int *length)
|
|||||||
if (uri)
|
if (uri)
|
||||||
{
|
{
|
||||||
strncpy (uri, at + *pos, *length);
|
strncpy (uri, at + *pos, *length);
|
||||||
uri[*length] = '\0';
|
uri[*length] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
return uri;
|
return uri;
|
||||||
|
@ -76,7 +76,7 @@ ftp_response (int fd, char **ret_line)
|
|||||||
*--p = '\0';
|
*--p = '\0';
|
||||||
|
|
||||||
if (opt.server_response)
|
if (opt.server_response)
|
||||||
logprintf (LOG_NOTQUIET, "%s\n",
|
logprintf (LOG_NOTQUIET, "%s\n",
|
||||||
quotearg_style (escape_quoting_style, line));
|
quotearg_style (escape_quoting_style, line));
|
||||||
else
|
else
|
||||||
DEBUGP (("%s\n", quotearg_style (escape_quoting_style, line)));
|
DEBUGP (("%s\n", quotearg_style (escape_quoting_style, line)));
|
||||||
@ -117,7 +117,7 @@ ftp_request (const char *command, const char *value)
|
|||||||
if (*p == '\r' || *p == '\n')
|
if (*p == '\r' || *p == '\n')
|
||||||
*p = ' ';
|
*p = ' ';
|
||||||
DEBUGP (("\nDetected newlines in %s \"%s\"; changing to %s \"%s\"\n",
|
DEBUGP (("\nDetected newlines in %s \"%s\"; changing to %s \"%s\"\n",
|
||||||
command, quotearg_style (escape_quoting_style, value),
|
command, quotearg_style (escape_quoting_style, value),
|
||||||
command, quotearg_style (escape_quoting_style, defanged)));
|
command, quotearg_style (escape_quoting_style, defanged)));
|
||||||
/* Make VALUE point to the defanged copy of the string. */
|
/* Make VALUE point to the defanged copy of the string. */
|
||||||
value = defanged;
|
value = defanged;
|
||||||
@ -246,7 +246,7 @@ ftp_login (int csock, const char *acc, const char *pass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ip_address_to_port_repr (const ip_address *addr, int port, char *buf,
|
ip_address_to_port_repr (const ip_address *addr, int port, char *buf,
|
||||||
size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
unsigned char *ptr;
|
unsigned char *ptr;
|
||||||
@ -322,7 +322,7 @@ ftp_port (int csock, int *local_sock)
|
|||||||
|
|
||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
static void
|
static void
|
||||||
ip_address_to_lprt_repr (const ip_address *addr, int port, char *buf,
|
ip_address_to_lprt_repr (const ip_address *addr, int port, char *buf,
|
||||||
size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
unsigned char *ptr = IP_INADDR_DATA (addr);
|
unsigned char *ptr = IP_INADDR_DATA (addr);
|
||||||
@ -331,18 +331,18 @@ ip_address_to_lprt_repr (const ip_address *addr, int port, char *buf,
|
|||||||
assert (buflen >= 21 * 4);
|
assert (buflen >= 21 * 4);
|
||||||
|
|
||||||
/* Construct the argument of LPRT (of the form af,n,h1,h2,...,hn,p1,p2). */
|
/* Construct the argument of LPRT (of the form af,n,h1,h2,...,hn,p1,p2). */
|
||||||
switch (addr->family)
|
switch (addr->family)
|
||||||
{
|
{
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
snprintf (buf, buflen, "%d,%d,%d,%d,%d,%d,%d,%d,%d", 4, 4,
|
snprintf (buf, buflen, "%d,%d,%d,%d,%d,%d,%d,%d,%d", 4, 4,
|
||||||
ptr[0], ptr[1], ptr[2], ptr[3], 2,
|
ptr[0], ptr[1], ptr[2], ptr[3], 2,
|
||||||
(port & 0xff00) >> 8, port & 0xff);
|
(port & 0xff00) >> 8, port & 0xff);
|
||||||
break;
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
snprintf (buf, buflen,
|
snprintf (buf, buflen,
|
||||||
"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
|
"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
|
||||||
6, 16,
|
6, 16,
|
||||||
ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7],
|
ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7],
|
||||||
ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15],
|
ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15],
|
||||||
2, (port & 0xff00) >> 8, port & 0xff);
|
2, (port & 0xff00) >> 8, port & 0xff);
|
||||||
break;
|
break;
|
||||||
@ -410,15 +410,15 @@ ftp_lprt (int csock, int *local_sock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ip_address_to_eprt_repr (const ip_address *addr, int port, char *buf,
|
ip_address_to_eprt_repr (const ip_address *addr, int port, char *buf,
|
||||||
size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
int afnum;
|
int afnum;
|
||||||
|
|
||||||
/* buf must contain the argument of EPRT (of the form |af|addr|port|).
|
/* buf must contain the argument of EPRT (of the form |af|addr|port|).
|
||||||
* 4 chars for the | separators, INET6_ADDRSTRLEN chars for addr
|
* 4 chars for the | separators, INET6_ADDRSTRLEN chars for addr
|
||||||
* 1 char for af (1-2) and 5 chars for port (0-65535) */
|
* 1 char for af (1-2) and 5 chars for port (0-65535) */
|
||||||
assert (buflen >= 4 + INET6_ADDRSTRLEN + 1 + 5);
|
assert (buflen >= 4 + INET6_ADDRSTRLEN + 1 + 5);
|
||||||
|
|
||||||
/* Construct the argument of EPRT (of the form |af|addr|port|). */
|
/* Construct the argument of EPRT (of the form |af|addr|port|). */
|
||||||
afnum = (addr->family == AF_INET ? 1 : 2);
|
afnum = (addr->family == AF_INET ? 1 : 2);
|
||||||
@ -437,8 +437,8 @@ ftp_eprt (int csock, int *local_sock)
|
|||||||
ip_address addr;
|
ip_address addr;
|
||||||
int nwritten;
|
int nwritten;
|
||||||
int port;
|
int port;
|
||||||
/* Must contain the argument of EPRT (of the form |af|addr|port|).
|
/* Must contain the argument of EPRT (of the form |af|addr|port|).
|
||||||
* 4 chars for the | separators, INET6_ADDRSTRLEN chars for addr
|
* 4 chars for the | separators, INET6_ADDRSTRLEN chars for addr
|
||||||
* 1 char for af (1-2) and 5 chars for port (0-65535) */
|
* 1 char for af (1-2) and 5 chars for port (0-65535) */
|
||||||
char bytes[4 + INET6_ADDRSTRLEN + 1 + 5 + 1];
|
char bytes[4 + INET6_ADDRSTRLEN + 1 + 5 + 1];
|
||||||
|
|
||||||
@ -587,7 +587,7 @@ ftp_lpsv (int csock, ip_address *addr, int *port)
|
|||||||
{
|
{
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
return FTPNOPASV;
|
return FTPNOPASV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parse the response. */
|
/* Parse the response. */
|
||||||
s = respline;
|
s = respline;
|
||||||
@ -750,7 +750,7 @@ ftp_epsv (int csock, ip_address *ip, int *port)
|
|||||||
{
|
{
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
return FTPNOPASV;
|
return FTPNOPASV;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert (respline != NULL);
|
assert (respline != NULL);
|
||||||
|
|
||||||
@ -765,7 +765,7 @@ ftp_epsv (int csock, ip_address *ip, int *port)
|
|||||||
{
|
{
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
return FTPINVPASV;
|
return FTPINVPASV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip the first two void fields */
|
/* Skip the first two void fields */
|
||||||
s = start + 1;
|
s = start + 1;
|
||||||
@ -774,26 +774,26 @@ ftp_epsv (int csock, ip_address *ip, int *port)
|
|||||||
{
|
{
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
return FTPINVPASV;
|
return FTPINVPASV;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
if (*s++ != delim)
|
if (*s++ != delim)
|
||||||
{
|
{
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
return FTPINVPASV;
|
return FTPINVPASV;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finally, get the port number */
|
/* Finally, get the port number */
|
||||||
tport = 0;
|
tport = 0;
|
||||||
for (i = 1; c_isdigit (*s); s++)
|
for (i = 1; c_isdigit (*s); s++)
|
||||||
{
|
{
|
||||||
if (i > 5)
|
if (i > 5)
|
||||||
{
|
{
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
return FTPINVPASV;
|
return FTPINVPASV;
|
||||||
}
|
}
|
||||||
tport = (*s - '0') + 10 * tport;
|
tport = (*s - '0') + 10 * tport;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -802,13 +802,13 @@ ftp_epsv (int csock, ip_address *ip, int *port)
|
|||||||
{
|
{
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
return FTPINVPASV;
|
return FTPINVPASV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*s++ != ')')
|
if (*s++ != ')')
|
||||||
{
|
{
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
return FTPINVPASV;
|
return FTPINVPASV;
|
||||||
}
|
}
|
||||||
|
|
||||||
*port = tport;
|
*port = tport;
|
||||||
|
|
||||||
@ -966,7 +966,7 @@ ftp_list (int csock, const char *file, enum stype rs)
|
|||||||
bool ok = false;
|
bool ok = false;
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
/* Try `LIST -a' first and revert to `LIST' in case of failure. */
|
/* Try `LIST -a' first and revert to `LIST' in case of failure. */
|
||||||
const char *list_commands[] = { "LIST -a",
|
const char *list_commands[] = { "LIST -a",
|
||||||
"LIST" };
|
"LIST" };
|
||||||
|
|
||||||
/* 2008-01-29 SMS. For a VMS FTP server, where "LIST -a" may not
|
/* 2008-01-29 SMS. For a VMS FTP server, where "LIST -a" may not
|
||||||
@ -999,7 +999,7 @@ ftp_list (int csock, const char *file, enum stype rs)
|
|||||||
err = FTPOK;
|
err = FTPOK;
|
||||||
ok = true;
|
ok = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
err = FTPRERR;
|
err = FTPRERR;
|
||||||
}
|
}
|
||||||
@ -1007,7 +1007,7 @@ ftp_list (int csock, const char *file, enum stype rs)
|
|||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
} while (i < countof (list_commands) && !ok);
|
} while (i < countof (list_commands) && !ok);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1142,9 +1142,9 @@ ftp_size (int csock, const char *file, wgint *size)
|
|||||||
}
|
}
|
||||||
if (*respline == '5')
|
if (*respline == '5')
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Probably means SIZE isn't supported on this server.
|
* Probably means SIZE isn't supported on this server.
|
||||||
* Error is nonfatal since SIZE isn't in RFC 959
|
* Error is nonfatal since SIZE isn't in RFC 959
|
||||||
*/
|
*/
|
||||||
xfree (respline);
|
xfree (respline);
|
||||||
*size = 0;
|
*size = 0;
|
||||||
@ -1155,7 +1155,7 @@ ftp_size (int csock, const char *file, wgint *size)
|
|||||||
*size = str_to_wgint (respline + 4, NULL, 10);
|
*size = str_to_wgint (respline + 4, NULL, 10);
|
||||||
if (errno)
|
if (errno)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Couldn't parse the response for some reason. On the (few)
|
* Couldn't parse the response for some reason. On the (few)
|
||||||
* tests I've done, the response is 213 <SIZE> with nothing else -
|
* tests I've done, the response is 213 <SIZE> with nothing else -
|
||||||
* maybe something a bit more resilient is necessary. It's not a
|
* maybe something a bit more resilient is necessary. It's not a
|
||||||
|
20
src/ftp-ls.c
20
src/ftp-ls.c
@ -1,6 +1,6 @@
|
|||||||
/* Parsing FTP `ls' output.
|
/* Parsing FTP `ls' output.
|
||||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Wget.
|
This file is part of GNU Wget.
|
||||||
|
|
||||||
@ -72,13 +72,13 @@ static int
|
|||||||
clean_line(char *line)
|
clean_line(char *line)
|
||||||
{
|
{
|
||||||
int len = strlen (line);
|
int len = strlen (line);
|
||||||
if (!len) return 0;
|
if (!len) return 0;
|
||||||
if (line[len - 1] == '\n')
|
if (line[len - 1] == '\n')
|
||||||
line[--len] = '\0';
|
line[--len] = '\0';
|
||||||
if (!len) return 0;
|
if (!len) return 0;
|
||||||
if (line[len - 1] == '\r')
|
if (line[len - 1] == '\r')
|
||||||
line[--len] = '\0';
|
line[--len] = '\0';
|
||||||
for ( ; *line ; line++ ) if (*line == '\t') *line = ' ';
|
for ( ; *line ; line++ ) if (*line == '\t') *line = ' ';
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,9 +487,9 @@ ftp_parse_winnt_ls (const char *file)
|
|||||||
if (hour == 12) hour = 0;
|
if (hour == 12) hour = 0;
|
||||||
if (*tok == 'P') hour += 12;
|
if (*tok == 'P') hour += 12;
|
||||||
|
|
||||||
DEBUGP(("YYYY/MM/DD HH:MM - %d/%02d/%02d %02d:%02d\n",
|
DEBUGP(("YYYY/MM/DD HH:MM - %d/%02d/%02d %02d:%02d\n",
|
||||||
year+1900, month, day, hour, min));
|
year+1900, month, day, hour, min));
|
||||||
|
|
||||||
/* Build the time-stamp (copy & paste from above) */
|
/* Build the time-stamp (copy & paste from above) */
|
||||||
timestruct.tm_sec = 0;
|
timestruct.tm_sec = 0;
|
||||||
timestruct.tm_min = min;
|
timestruct.tm_min = min;
|
||||||
@ -567,7 +567,7 @@ ftp_parse_winnt_ls (const char *file)
|
|||||||
more or less. (Different VMS FTP servers may have different headers,
|
more or less. (Different VMS FTP servers may have different headers,
|
||||||
and may not supply the same data, but all should be subsets of this.)
|
and may not supply the same data, but all should be subsets of this.)
|
||||||
|
|
||||||
VMS normally provides local (server) time and date information.
|
VMS normally provides local (server) time and date information.
|
||||||
Define the logical name or environment variable
|
Define the logical name or environment variable
|
||||||
"WGET_TIMEZONE_DIFFERENTIAL" (seconds) to adjust the receiving local
|
"WGET_TIMEZONE_DIFFERENTIAL" (seconds) to adjust the receiving local
|
||||||
times if different from the remote local times.
|
times if different from the remote local times.
|
||||||
@ -770,7 +770,7 @@ ftp_parse_vms_ls (const char *file)
|
|||||||
#endif /* (!defined( __VMS) && !defined( PRESERVE_VMS_VERSIONS)) */
|
#endif /* (!defined( __VMS) && !defined( PRESERVE_VMS_VERSIONS)) */
|
||||||
|
|
||||||
/* 2005-02-23 SMS.
|
/* 2005-02-23 SMS.
|
||||||
Eliminate "^" escape characters from ODS5 extended file name.
|
Eliminate "^" escape characters from ODS5 extended file name.
|
||||||
(A caret is invalid in an ODS2 name, so this is always safe.)
|
(A caret is invalid in an ODS2 name, so this is always safe.)
|
||||||
*/
|
*/
|
||||||
eat_carets( tok);
|
eat_carets( tok);
|
||||||
@ -824,7 +824,7 @@ ftp_parse_vms_ls (const char *file)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
tok = strtok(NULL, " ");
|
tok = strtok(NULL, " ");
|
||||||
if (tok == NULL)
|
if (tok == NULL)
|
||||||
{
|
{
|
||||||
DEBUGP(("Getting additional line.\n"));
|
DEBUGP(("Getting additional line.\n"));
|
||||||
xfree (line);
|
xfree (line);
|
||||||
@ -944,7 +944,7 @@ ftp_parse_vms_ls (const char *file)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Nondescript. Probably size(s), probably in blocks.
|
/* Nondescript. Probably size(s), probably in blocks.
|
||||||
Could be "No privilege ..." message. (Ignore.)
|
Could be "No privilege ..." message. (Ignore.)
|
||||||
*/
|
*/
|
||||||
DEBUGP (("Ignored (size?).\n"));
|
DEBUGP (("Ignored (size?).\n"));
|
||||||
|
46
src/ftp.c
46
src/ftp.c
@ -69,7 +69,7 @@ typedef struct
|
|||||||
int cmd; /* command code */
|
int cmd; /* command code */
|
||||||
int csock; /* control connection socket */
|
int csock; /* control connection socket */
|
||||||
double dltime; /* time of the download in msecs */
|
double dltime; /* time of the download in msecs */
|
||||||
enum stype rs; /* remote system reported by ftp server */
|
enum stype rs; /* remote system reported by ftp server */
|
||||||
char *id; /* initial directory */
|
char *id; /* initial directory */
|
||||||
char *target; /* target file name */
|
char *target; /* target file name */
|
||||||
struct url *proxy; /* FTWK-style proxy */
|
struct url *proxy; /* FTWK-style proxy */
|
||||||
@ -110,7 +110,7 @@ ftp_expected_bytes (const char *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
/*
|
/*
|
||||||
* This function sets up a passive data connection with the FTP server.
|
* This function sets up a passive data connection with the FTP server.
|
||||||
* It is merely a wrapper around ftp_epsv, ftp_lpsv and ftp_pasv.
|
* It is merely a wrapper around ftp_epsv, ftp_lpsv and ftp_pasv.
|
||||||
*/
|
*/
|
||||||
@ -125,8 +125,8 @@ ftp_do_pasv (int csock, ip_address *addr, int *port)
|
|||||||
if (!socket_ip_address (csock, addr, ENDPOINT_PEER))
|
if (!socket_ip_address (csock, addr, ENDPOINT_PEER))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
/* If our control connection is over IPv6, then we first try EPSV and then
|
/* If our control connection is over IPv6, then we first try EPSV and then
|
||||||
* LPSV if the former is not supported. If the control connection is over
|
* LPSV if the former is not supported. If the control connection is over
|
||||||
* IPv4, we simply issue the good old PASV request. */
|
* IPv4, we simply issue the good old PASV request. */
|
||||||
switch (addr->family)
|
switch (addr->family)
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ ftp_do_pasv (int csock, ip_address *addr, int *port)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function sets up an active data connection with the FTP server.
|
* This function sets up an active data connection with the FTP server.
|
||||||
* It is merely a wrapper around ftp_eprt, ftp_lprt and ftp_port.
|
* It is merely a wrapper around ftp_eprt, ftp_lprt and ftp_port.
|
||||||
*/
|
*/
|
||||||
@ -168,8 +168,8 @@ ftp_do_port (int csock, int *local_sock)
|
|||||||
if (!socket_ip_address (csock, &cip, ENDPOINT_PEER))
|
if (!socket_ip_address (csock, &cip, ENDPOINT_PEER))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
/* If our control connection is over IPv6, then we first try EPRT and then
|
/* If our control connection is over IPv6, then we first try EPRT and then
|
||||||
* LPRT if the former is not supported. If the control connection is over
|
* LPRT if the former is not supported. If the control connection is over
|
||||||
* IPv4, we simply issue the good old PORT request. */
|
* IPv4, we simply issue the good old PORT request. */
|
||||||
switch (cip.family)
|
switch (cip.family)
|
||||||
{
|
{
|
||||||
@ -312,7 +312,7 @@ getftp (struct url *u, wgint passed_expected_bytes, wgint *qtyread,
|
|||||||
con->csock = -1;
|
con->csock = -1;
|
||||||
|
|
||||||
/* Second: Login with proper USER/PASS sequence. */
|
/* Second: Login with proper USER/PASS sequence. */
|
||||||
logprintf (LOG_VERBOSE, _("Logging in as %s ... "),
|
logprintf (LOG_VERBOSE, _("Logging in as %s ... "),
|
||||||
quotearg_style (escape_quoting_style, user));
|
quotearg_style (escape_quoting_style, user));
|
||||||
if (opt.server_response)
|
if (opt.server_response)
|
||||||
logputs (LOG_ALWAYS, "\n");
|
logputs (LOG_ALWAYS, "\n");
|
||||||
@ -429,7 +429,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* VMS will report something like "PUB$DEVICE:[INITIAL.FOLDER]".
|
/* VMS will report something like "PUB$DEVICE:[INITIAL.FOLDER]".
|
||||||
Convert it to "/INITIAL/FOLDER" */
|
Convert it to "/INITIAL/FOLDER" */
|
||||||
if (con->rs == ST_VMS)
|
if (con->rs == ST_VMS)
|
||||||
{
|
{
|
||||||
char *path = strchr (con->id, '[');
|
char *path = strchr (con->id, '[');
|
||||||
@ -529,7 +529,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
Why is this wise even on UNIX? It certainly fouls VMS.
|
Why is this wise even on UNIX? It certainly fouls VMS.
|
||||||
See below for a more reliable, more universal method.
|
See below for a more reliable, more universal method.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* 2008-04-22 MJC.
|
/* 2008-04-22 MJC.
|
||||||
I'm not crazy about it either. I'm informed it's useful
|
I'm not crazy about it either. I'm informed it's useful
|
||||||
for misconfigured servers that have some dirs in the path
|
for misconfigured servers that have some dirs in the path
|
||||||
@ -603,7 +603,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
|
|
||||||
/* 2004-09-20 SMS.
|
/* 2004-09-20 SMS.
|
||||||
A relative directory is relative to the initial directory.
|
A relative directory is relative to the initial directory.
|
||||||
Thus, what _is_ useful on VMS (and probably elsewhere) is
|
Thus, what _is_ useful on VMS (and probably elsewhere) is
|
||||||
to CWD to the initial directory (ideally, whatever the
|
to CWD to the initial directory (ideally, whatever the
|
||||||
server reports, _exactly_, NOT badly UNIX-ixed), and then
|
server reports, _exactly_, NOT badly UNIX-ixed), and then
|
||||||
@ -738,7 +738,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
if (opt.verbose)
|
if (opt.verbose)
|
||||||
{
|
{
|
||||||
if (!opt.server_response)
|
if (!opt.server_response)
|
||||||
logprintf (LOG_VERBOSE, "==> SIZE %s ... ",
|
logprintf (LOG_VERBOSE, "==> SIZE %s ... ",
|
||||||
quotearg_style (escape_quoting_style, u->file));
|
quotearg_style (escape_quoting_style, u->file));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -805,7 +805,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
} /* switch (err) */
|
} /* switch (err) */
|
||||||
if (err==FTPOK)
|
if (err==FTPOK)
|
||||||
{
|
{
|
||||||
DEBUGP (("trying to connect to %s port %d\n",
|
DEBUGP (("trying to connect to %s port %d\n",
|
||||||
print_address (&passive_addr), passive_port));
|
print_address (&passive_addr), passive_port));
|
||||||
dtsock = connect_to_ip (&passive_addr, passive_port, NULL);
|
dtsock = connect_to_ip (&passive_addr, passive_port, NULL);
|
||||||
if (dtsock < 0)
|
if (dtsock < 0)
|
||||||
@ -935,14 +935,14 @@ Error in server response, closing control connection.\n"));
|
|||||||
uerr_t res;
|
uerr_t res;
|
||||||
struct fileinfo *f;
|
struct fileinfo *f;
|
||||||
res = ftp_get_listing (u, con, &f);
|
res = ftp_get_listing (u, con, &f);
|
||||||
/* Set the DO_RETR command flag again, because it gets unset when
|
/* Set the DO_RETR command flag again, because it gets unset when
|
||||||
calling ftp_get_listing() and would otherwise cause an assertion
|
calling ftp_get_listing() and would otherwise cause an assertion
|
||||||
failure earlier on when this function gets repeatedly called
|
failure earlier on when this function gets repeatedly called
|
||||||
(e.g., when recursing). */
|
(e.g., when recursing). */
|
||||||
con->cmd |= DO_RETR;
|
con->cmd |= DO_RETR;
|
||||||
if (res == RETROK)
|
if (res == RETROK)
|
||||||
{
|
{
|
||||||
while (f)
|
while (f)
|
||||||
{
|
{
|
||||||
if (!strcmp (f->name, u->file))
|
if (!strcmp (f->name, u->file))
|
||||||
{
|
{
|
||||||
@ -977,7 +977,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
{
|
{
|
||||||
if (restval)
|
if (restval)
|
||||||
logputs (LOG_VERBOSE, "\n");
|
logputs (LOG_VERBOSE, "\n");
|
||||||
logprintf (LOG_VERBOSE, "==> RETR %s ... ",
|
logprintf (LOG_VERBOSE, "==> RETR %s ... ",
|
||||||
quotearg_style (escape_quoting_style, u->file));
|
quotearg_style (escape_quoting_style, u->file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1095,7 +1095,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Open the file -- if output_stream is set, use it instead. */
|
/* Open the file -- if output_stream is set, use it instead. */
|
||||||
|
|
||||||
/* 2005-04-17 SMS.
|
/* 2005-04-17 SMS.
|
||||||
Note that having the output_stream ("-O") file opened in main()
|
Note that having the output_stream ("-O") file opened in main()
|
||||||
(main.c) rather limits the ability in VMS to open the file
|
(main.c) rather limits the ability in VMS to open the file
|
||||||
@ -1116,7 +1116,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
con->target = targ;
|
con->target = targ;
|
||||||
}
|
}
|
||||||
#endif /* def __VMS */
|
#endif /* def __VMS */
|
||||||
|
|
||||||
mkalldirs (con->target);
|
mkalldirs (con->target);
|
||||||
if (opt.backups)
|
if (opt.backups)
|
||||||
rotate_backups (con->target);
|
rotate_backups (con->target);
|
||||||
@ -1135,7 +1135,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
#else /* def __VMS */
|
#else /* def __VMS */
|
||||||
# define BIN_TYPE_FILE 1
|
# define BIN_TYPE_FILE 1
|
||||||
#endif /* def __VMS [else] */
|
#endif /* def __VMS [else] */
|
||||||
|
|
||||||
if (restval && !(con->cmd & DO_LIST))
|
if (restval && !(con->cmd & DO_LIST))
|
||||||
{
|
{
|
||||||
#ifdef __VMS
|
#ifdef __VMS
|
||||||
@ -1331,7 +1331,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
char *p = strchr (line, '\0');
|
char *p = strchr (line, '\0');
|
||||||
while (p > line && (p[-1] == '\n' || p[-1] == '\r'))
|
while (p > line && (p[-1] == '\n' || p[-1] == '\r'))
|
||||||
*--p = '\0';
|
*--p = '\0';
|
||||||
logprintf (LOG_ALWAYS, "%s\n",
|
logprintf (LOG_ALWAYS, "%s\n",
|
||||||
quotearg_style (escape_quoting_style, line));
|
quotearg_style (escape_quoting_style, line));
|
||||||
xfree (line);
|
xfree (line);
|
||||||
}
|
}
|
||||||
@ -2033,7 +2033,7 @@ ftp_retrieve_glob (struct url *u, ccon *con, int action)
|
|||||||
if (matchres == -1)
|
if (matchres == -1)
|
||||||
{
|
{
|
||||||
logprintf (LOG_NOTQUIET, _("Error matching %s against %s: %s\n"),
|
logprintf (LOG_NOTQUIET, _("Error matching %s against %s: %s\n"),
|
||||||
u->file, quotearg_style (escape_quoting_style, f->name),
|
u->file, quotearg_style (escape_quoting_style, f->name),
|
||||||
strerror (errno));
|
strerror (errno));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ static struct transport_implementation wgnutls_transport = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ssl_connect (int fd)
|
ssl_connect (int fd)
|
||||||
{
|
{
|
||||||
static const int cert_type_priority[] = {
|
static const int cert_type_priority[] = {
|
||||||
GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0
|
GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0
|
||||||
|
10
src/hash.c
10
src/hash.c
@ -630,7 +630,7 @@ hash_table_count (const struct hash_table *ht)
|
|||||||
* Support for hash tables whose keys are strings.
|
* Support for hash tables whose keys are strings.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Base 31 hash function. Taken from Gnome's glib, modified to use
|
/* Base 31 hash function. Taken from Gnome's glib, modified to use
|
||||||
standard C types.
|
standard C types.
|
||||||
|
|
||||||
@ -643,11 +643,11 @@ hash_string (const void *key)
|
|||||||
{
|
{
|
||||||
const char *p = key;
|
const char *p = key;
|
||||||
unsigned int h = *p;
|
unsigned int h = *p;
|
||||||
|
|
||||||
if (h)
|
if (h)
|
||||||
for (p += 1; *p != '\0'; p++)
|
for (p += 1; *p != '\0'; p++)
|
||||||
h = (h << 5) - h + *p;
|
h = (h << 5) - h + *p;
|
||||||
|
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -681,11 +681,11 @@ hash_string_nocase (const void *key)
|
|||||||
{
|
{
|
||||||
const char *p = key;
|
const char *p = key;
|
||||||
unsigned int h = c_tolower (*p);
|
unsigned int h = c_tolower (*p);
|
||||||
|
|
||||||
if (h)
|
if (h)
|
||||||
for (p += 1; *p != '\0'; p++)
|
for (p += 1; *p != '\0'; p++)
|
||||||
h = (h << 5) - h + c_tolower (*p);
|
h = (h << 5) - h + c_tolower (*p);
|
||||||
|
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
src/host.c
14
src/host.c
@ -202,7 +202,7 @@ address_list_from_addrinfo (const struct addrinfo *ai)
|
|||||||
|
|
||||||
ip = al->addresses;
|
ip = al->addresses;
|
||||||
for (ptr = ai; ptr != NULL; ptr = ptr->ai_next)
|
for (ptr = ai; ptr != NULL; ptr = ptr->ai_next)
|
||||||
if (ptr->ai_family == AF_INET6)
|
if (ptr->ai_family == AF_INET6)
|
||||||
{
|
{
|
||||||
const struct sockaddr_in6 *sin6 =
|
const struct sockaddr_in6 *sin6 =
|
||||||
(const struct sockaddr_in6 *)ptr->ai_addr;
|
(const struct sockaddr_in6 *)ptr->ai_addr;
|
||||||
@ -212,7 +212,7 @@ address_list_from_addrinfo (const struct addrinfo *ai)
|
|||||||
ip->ipv6_scope = sin6->sin6_scope_id;
|
ip->ipv6_scope = sin6->sin6_scope_id;
|
||||||
#endif
|
#endif
|
||||||
++ip;
|
++ip;
|
||||||
}
|
}
|
||||||
else if (ptr->ai_family == AF_INET)
|
else if (ptr->ai_family == AF_INET)
|
||||||
{
|
{
|
||||||
const struct sockaddr_in *sin =
|
const struct sockaddr_in *sin =
|
||||||
@ -462,7 +462,7 @@ is_valid_ipv4_address (const char *str, const char *end)
|
|||||||
}
|
}
|
||||||
if (octets < 4)
|
if (octets < 4)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,7 +487,7 @@ is_valid_ipv6_address (const char *str, const char *end)
|
|||||||
|
|
||||||
if (str == end)
|
if (str == end)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Leading :: requires some special handling. */
|
/* Leading :: requires some special handling. */
|
||||||
if (*str == ':')
|
if (*str == ':')
|
||||||
{
|
{
|
||||||
@ -544,20 +544,20 @@ is_valid_ipv6_address (const char *str, const char *end)
|
|||||||
saw_xdigit = false;
|
saw_xdigit = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (saw_xdigit)
|
if (saw_xdigit)
|
||||||
{
|
{
|
||||||
if (tp > ns_in6addrsz - ns_int16sz)
|
if (tp > ns_in6addrsz - ns_int16sz)
|
||||||
return false;
|
return false;
|
||||||
tp += ns_int16sz;
|
tp += ns_int16sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colonp != NULL)
|
if (colonp != NULL)
|
||||||
{
|
{
|
||||||
if (tp == ns_in6addrsz)
|
if (tp == ns_in6addrsz)
|
||||||
return false;
|
return false;
|
||||||
tp = ns_in6addrsz;
|
tp = ns_in6addrsz;
|
||||||
}
|
}
|
||||||
|
@ -625,7 +625,7 @@ collect_tags_mapper (struct taginfo *tag, void *arg)
|
|||||||
|
|
||||||
/* Find the tag in our table of tags. This must not fail because
|
/* Find the tag in our table of tags. This must not fail because
|
||||||
map_html_tags only returns tags found in interesting_tags.
|
map_html_tags only returns tags found in interesting_tags.
|
||||||
|
|
||||||
I've changed this for now, I'm passing NULL as interesting_tags
|
I've changed this for now, I'm passing NULL as interesting_tags
|
||||||
to map_html_tags. This way we can check all tags for a style
|
to map_html_tags. This way we can check all tags for a style
|
||||||
attribute.
|
attribute.
|
||||||
|
@ -32,7 +32,7 @@ as that of the covered work. */
|
|||||||
#include "wget.h"
|
#include "wget.h"
|
||||||
|
|
||||||
/* NTLM details:
|
/* NTLM details:
|
||||||
|
|
||||||
http://davenport.sourceforge.net/ntlm.html
|
http://davenport.sourceforge.net/ntlm.html
|
||||||
http://www.innovation.ch/java/ntlm.html
|
http://www.innovation.ch/java/ntlm.html
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ mkhash(const char *password,
|
|||||||
|
|
||||||
if (len > 14)
|
if (len > 14)
|
||||||
len = 14;
|
len = 14;
|
||||||
|
|
||||||
for (i=0; i<len; i++)
|
for (i=0; i<len; i++)
|
||||||
pw[i] = c_toupper (password[i]);
|
pw[i] = c_toupper (password[i]);
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ mkhash(const char *password,
|
|||||||
setup_des_key(pw, DESKEY(ks));
|
setup_des_key(pw, DESKEY(ks));
|
||||||
DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)lmbuffer,
|
DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)lmbuffer,
|
||||||
DESKEY(ks), DES_ENCRYPT);
|
DESKEY(ks), DES_ENCRYPT);
|
||||||
|
|
||||||
setup_des_key(pw+7, DESKEY(ks));
|
setup_des_key(pw+7, DESKEY(ks));
|
||||||
DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer+8),
|
DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer+8),
|
||||||
DESKEY(ks), DES_ENCRYPT);
|
DESKEY(ks), DES_ENCRYPT);
|
||||||
@ -324,7 +324,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
|||||||
|
|
||||||
if(!passwd)
|
if(!passwd)
|
||||||
passwd="";
|
passwd="";
|
||||||
|
|
||||||
switch(ntlm->state) {
|
switch(ntlm->state) {
|
||||||
case NTLMSTATE_TYPE1:
|
case NTLMSTATE_TYPE1:
|
||||||
default: /* for the weird cases we (re)start here */
|
default: /* for the weird cases we (re)start here */
|
||||||
@ -332,7 +332,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
|||||||
domoff = hostoff + hostlen;
|
domoff = hostoff + hostlen;
|
||||||
|
|
||||||
DEBUGP (("Creating a type-1 NTLM message.\n"));
|
DEBUGP (("Creating a type-1 NTLM message.\n"));
|
||||||
|
|
||||||
/* Create and send a type-1 message:
|
/* Create and send a type-1 message:
|
||||||
|
|
||||||
Index Description Content
|
Index Description Content
|
||||||
@ -385,7 +385,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
|||||||
|
|
||||||
output = concat_strings ("NTLM ", base64, (char *) 0);
|
output = concat_strings ("NTLM ", base64, (char *) 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NTLMSTATE_TYPE2:
|
case NTLMSTATE_TYPE2:
|
||||||
/* We received the type-2 already, create a type-3 message:
|
/* We received the type-2 already, create a type-3 message:
|
||||||
|
|
||||||
@ -403,7 +403,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
|||||||
52 (64) start of data block
|
52 (64) start of data block
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
int lmrespoff;
|
int lmrespoff;
|
||||||
int ntrespoff;
|
int ntrespoff;
|
||||||
@ -461,20 +461,20 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
|||||||
"%c%c" /* domain allocated space */
|
"%c%c" /* domain allocated space */
|
||||||
"%c%c" /* domain name offset */
|
"%c%c" /* domain name offset */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
"%c%c" /* user length */
|
"%c%c" /* user length */
|
||||||
"%c%c" /* user allocated space */
|
"%c%c" /* user allocated space */
|
||||||
"%c%c" /* user offset */
|
"%c%c" /* user offset */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
"%c%c" /* host length */
|
"%c%c" /* host length */
|
||||||
"%c%c" /* host allocated space */
|
"%c%c" /* host allocated space */
|
||||||
"%c%c" /* host offset */
|
"%c%c" /* host offset */
|
||||||
"%c%c%c%c%c%c" /* 6 zeroes */
|
"%c%c%c%c%c%c" /* 6 zeroes */
|
||||||
|
|
||||||
"\xff\xff" /* message length */
|
"\xff\xff" /* message length */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
"\x01\x82" /* flags */
|
"\x01\x82" /* flags */
|
||||||
"%c%c" /* 2 zeroes */
|
"%c%c" /* 2 zeroes */
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
|||||||
before we copy them there. */
|
before we copy them there. */
|
||||||
if(((size_t) size + userlen + domlen) >= sizeof(ntlmbuf))
|
if(((size_t) size + userlen + domlen) >= sizeof(ntlmbuf))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memcpy(&ntlmbuf[size], domain, domlen);
|
memcpy(&ntlmbuf[size], domain, domlen);
|
||||||
size += domlen;
|
size += domlen;
|
||||||
|
|
||||||
@ -543,7 +543,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_NTRESPONSES
|
#ifdef USE_NTRESPONSES
|
||||||
if(size < ((int)sizeof(ntlmbuf) - 0x18)) {
|
if(size < ((int)sizeof(ntlmbuf) - 0x18)) {
|
||||||
memcpy(&ntlmbuf[size], ntresp, 0x18);
|
memcpy(&ntlmbuf[size], ntresp, 0x18);
|
||||||
size += 0x18;
|
size += 0x18;
|
||||||
}
|
}
|
||||||
|
78
src/http.c
78
src/http.c
@ -774,7 +774,7 @@ resp_status (const struct response *resp, char **message)
|
|||||||
while (p < end && c_isdigit (*p))
|
while (p < end && c_isdigit (*p))
|
||||||
++p;
|
++p;
|
||||||
if (p < end && *p == '.')
|
if (p < end && *p == '.')
|
||||||
++p;
|
++p;
|
||||||
while (p < end && c_isdigit (*p))
|
while (p < end && c_isdigit (*p))
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
@ -819,7 +819,7 @@ print_response_line(const char *prefix, const char *b, const char *e)
|
|||||||
{
|
{
|
||||||
char *copy;
|
char *copy;
|
||||||
BOUNDED_TO_ALLOCA(b, e, copy);
|
BOUNDED_TO_ALLOCA(b, e, copy);
|
||||||
logprintf (LOG_ALWAYS, "%s%s\n", prefix,
|
logprintf (LOG_ALWAYS, "%s%s\n", prefix,
|
||||||
quotearg_style (escape_quoting_style, copy));
|
quotearg_style (escape_quoting_style, copy));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1059,12 +1059,12 @@ parse_content_disposition (const char *hdr, char **filename)
|
|||||||
bool add_slash = (opt.dir_prefix[prefix_length - 1] != '/');
|
bool add_slash = (opt.dir_prefix[prefix_length - 1] != '/');
|
||||||
int total_length;
|
int total_length;
|
||||||
|
|
||||||
if (add_slash)
|
if (add_slash)
|
||||||
++prefix_length;
|
++prefix_length;
|
||||||
total_length = prefix_length + (value.e - value.b);
|
total_length = prefix_length + (value.e - value.b);
|
||||||
*filename = xmalloc (total_length + 1);
|
*filename = xmalloc (total_length + 1);
|
||||||
strcpy (*filename, opt.dir_prefix);
|
strcpy (*filename, opt.dir_prefix);
|
||||||
if (add_slash)
|
if (add_slash)
|
||||||
(*filename)[prefix_length - 1] = '/';
|
(*filename)[prefix_length - 1] = '/';
|
||||||
memcpy (*filename + prefix_length, value.b, (value.e - value.b));
|
memcpy (*filename + prefix_length, value.b, (value.e - value.b));
|
||||||
(*filename)[total_length] = '\0';
|
(*filename)[total_length] = '\0';
|
||||||
@ -1314,12 +1314,12 @@ struct http_stat
|
|||||||
existence after having begun to download
|
existence after having begun to download
|
||||||
(needed in gethttp for when connection is
|
(needed in gethttp for when connection is
|
||||||
interrupted/restarted. */
|
interrupted/restarted. */
|
||||||
bool timestamp_checked; /* true if pre-download time-stamping checks
|
bool timestamp_checked; /* true if pre-download time-stamping checks
|
||||||
* have already been performed */
|
* have already been performed */
|
||||||
char *orig_file_name; /* name of file to compare for time-stamping
|
char *orig_file_name; /* name of file to compare for time-stamping
|
||||||
* (might be != local_file if -K is set) */
|
* (might be != local_file if -K is set) */
|
||||||
wgint orig_file_size; /* size of file to compare for time-stamping */
|
wgint orig_file_size; /* size of file to compare for time-stamping */
|
||||||
time_t orig_file_tstamp; /* time-stamp of file to compare for
|
time_t orig_file_tstamp; /* time-stamp of file to compare for
|
||||||
* time-stamping */
|
* time-stamping */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1658,7 +1658,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
|||||||
sock = pconn.socket;
|
sock = pconn.socket;
|
||||||
using_ssl = pconn.ssl;
|
using_ssl = pconn.ssl;
|
||||||
logprintf (LOG_VERBOSE, _("Reusing existing connection to %s:%d.\n"),
|
logprintf (LOG_VERBOSE, _("Reusing existing connection to %s:%d.\n"),
|
||||||
quotearg_style (escape_quoting_style, pconn.host),
|
quotearg_style (escape_quoting_style, pconn.host),
|
||||||
pconn.port);
|
pconn.port);
|
||||||
DEBUGP (("Reusing fd %d.\n", sock));
|
DEBUGP (("Reusing fd %d.\n", sock));
|
||||||
if (pconn.authorized)
|
if (pconn.authorized)
|
||||||
@ -1977,17 +1977,17 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
|||||||
pconn.authorized = true;
|
pconn.authorized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine the local filename if needed. Notice that if -O is used
|
/* Determine the local filename if needed. Notice that if -O is used
|
||||||
* hstat.local_file is set by http_loop to the argument of -O. */
|
* hstat.local_file is set by http_loop to the argument of -O. */
|
||||||
if (!hs->local_file)
|
if (!hs->local_file)
|
||||||
{
|
{
|
||||||
/* Honor Content-Disposition whether possible. */
|
/* Honor Content-Disposition whether possible. */
|
||||||
if (!opt.content_disposition
|
if (!opt.content_disposition
|
||||||
|| !resp_header_copy (resp, "Content-Disposition",
|
|| !resp_header_copy (resp, "Content-Disposition",
|
||||||
hdrval, sizeof (hdrval))
|
hdrval, sizeof (hdrval))
|
||||||
|| !parse_content_disposition (hdrval, &hs->local_file))
|
|| !parse_content_disposition (hdrval, &hs->local_file))
|
||||||
{
|
{
|
||||||
/* The Content-Disposition header is missing or broken.
|
/* The Content-Disposition header is missing or broken.
|
||||||
* Choose unique file name according to given URL. */
|
* Choose unique file name according to given URL. */
|
||||||
hs->local_file = url_file_name (u);
|
hs->local_file = url_file_name (u);
|
||||||
}
|
}
|
||||||
@ -2169,7 +2169,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
|
|||||||
content-type. */
|
content-type. */
|
||||||
if (!type ||
|
if (!type ||
|
||||||
0 == strncasecmp (type, TEXTHTML_S, strlen (TEXTHTML_S)) ||
|
0 == strncasecmp (type, TEXTHTML_S, strlen (TEXTHTML_S)) ||
|
||||||
0 == strncasecmp (type, TEXTXHTML_S, strlen (TEXTXHTML_S)))
|
0 == strncasecmp (type, TEXTXHTML_S, strlen (TEXTXHTML_S)))
|
||||||
*dt |= TEXTHTML;
|
*dt |= TEXTHTML;
|
||||||
else
|
else
|
||||||
*dt &= ~TEXTHTML;
|
*dt &= ~TEXTHTML;
|
||||||
@ -2362,10 +2362,10 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
|
|||||||
/* Print fetch message, if opt.verbose. */
|
/* Print fetch message, if opt.verbose. */
|
||||||
if (opt.verbose)
|
if (opt.verbose)
|
||||||
{
|
{
|
||||||
logprintf (LOG_NOTQUIET, _("Saving to: %s\n"),
|
logprintf (LOG_NOTQUIET, _("Saving to: %s\n"),
|
||||||
HYPHENP (hs->local_file) ? quote ("STDOUT") : quote (hs->local_file));
|
HYPHENP (hs->local_file) ? quote ("STDOUT") : quote (hs->local_file));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This confuses the timestamping code that checks for file size.
|
/* This confuses the timestamping code that checks for file size.
|
||||||
#### The timestamping code should be smarter about file size. */
|
#### The timestamping code should be smarter about file size. */
|
||||||
if (opt.save_headers && hs->restval == 0)
|
if (opt.save_headers && hs->restval == 0)
|
||||||
@ -2495,7 +2495,7 @@ File %s already there; not retrieving.\n\n"),
|
|||||||
&& (got_name || !opt.content_disposition))
|
&& (got_name || !opt.content_disposition))
|
||||||
send_head_first = false;
|
send_head_first = false;
|
||||||
|
|
||||||
/* Send preliminary HEAD request if -N is given and we have an existing
|
/* Send preliminary HEAD request if -N is given and we have an existing
|
||||||
* destination file. */
|
* destination file. */
|
||||||
file_name = url_file_name (u);
|
file_name = url_file_name (u);
|
||||||
if (opt.timestamping
|
if (opt.timestamping
|
||||||
@ -2503,7 +2503,7 @@ File %s already there; not retrieving.\n\n"),
|
|||||||
&& file_exists_p (file_name))
|
&& file_exists_p (file_name))
|
||||||
send_head_first = true;
|
send_head_first = true;
|
||||||
xfree (file_name);
|
xfree (file_name);
|
||||||
|
|
||||||
/* THE loop */
|
/* THE loop */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -2602,7 +2602,7 @@ Spider mode enabled. Check if remote file exists.\n"));
|
|||||||
logputs (LOG_VERBOSE, "\n");
|
logputs (LOG_VERBOSE, "\n");
|
||||||
logprintf (LOG_NOTQUIET, _("Cannot write to %s (%s).\n"),
|
logprintf (LOG_NOTQUIET, _("Cannot write to %s (%s).\n"),
|
||||||
quote (hstat.local_file), strerror (errno));
|
quote (hstat.local_file), strerror (errno));
|
||||||
case HOSTERR: case CONIMPOSSIBLE: case PROXERR: case AUTHFAILED:
|
case HOSTERR: case CONIMPOSSIBLE: case PROXERR: case AUTHFAILED:
|
||||||
case SSLINITFAILED: case CONTNOTSUPPORTED: case VERIFCERTERR:
|
case SSLINITFAILED: case CONTNOTSUPPORTED: case VERIFCERTERR:
|
||||||
/* Fatal errors just return from the function. */
|
/* Fatal errors just return from the function. */
|
||||||
ret = err;
|
ret = err;
|
||||||
@ -2700,7 +2700,7 @@ Last-modified header invalid -- time-stamp ignored.\n"));
|
|||||||
if (*dt & HEAD_ONLY)
|
if (*dt & HEAD_ONLY)
|
||||||
time_came_from_head = true;
|
time_came_from_head = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (send_head_first)
|
if (send_head_first)
|
||||||
{
|
{
|
||||||
/* The time-stamping section. */
|
/* The time-stamping section. */
|
||||||
@ -2711,7 +2711,7 @@ Last-modified header invalid -- time-stamp ignored.\n"));
|
|||||||
we're supposed to
|
we're supposed to
|
||||||
download already exists. */
|
download already exists. */
|
||||||
{
|
{
|
||||||
if (hstat.remote_time &&
|
if (hstat.remote_time &&
|
||||||
tmr != (time_t) (-1))
|
tmr != (time_t) (-1))
|
||||||
{
|
{
|
||||||
/* Now time-stamping can be used validly.
|
/* Now time-stamping can be used validly.
|
||||||
@ -2722,7 +2722,7 @@ Last-modified header invalid -- time-stamp ignored.\n"));
|
|||||||
download procedure is resumed. */
|
download procedure is resumed. */
|
||||||
if (hstat.orig_file_tstamp >= tmr)
|
if (hstat.orig_file_tstamp >= tmr)
|
||||||
{
|
{
|
||||||
if (hstat.contlen == -1
|
if (hstat.contlen == -1
|
||||||
|| hstat.orig_file_size == hstat.contlen)
|
|| hstat.orig_file_size == hstat.contlen)
|
||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, _("\
|
logprintf (LOG_VERBOSE, _("\
|
||||||
@ -2745,11 +2745,11 @@ The sizes do not match (local %s) -- retrieving.\n"),
|
|||||||
logputs (LOG_VERBOSE, "\n");
|
logputs (LOG_VERBOSE, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free_hstat (&hstat); */
|
/* free_hstat (&hstat); */
|
||||||
hstat.timestamp_checked = true;
|
hstat.timestamp_checked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt.spider)
|
if (opt.spider)
|
||||||
{
|
{
|
||||||
bool finished = true;
|
bool finished = true;
|
||||||
@ -2761,7 +2761,7 @@ The sizes do not match (local %s) -- retrieving.\n"),
|
|||||||
Remote file exists and could contain links to other resources -- retrieving.\n\n"));
|
Remote file exists and could contain links to other resources -- retrieving.\n\n"));
|
||||||
finished = false;
|
finished = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, _("\
|
logprintf (LOG_VERBOSE, _("\
|
||||||
Remote file exists but does not contain any link -- not retrieving.\n\n"));
|
Remote file exists but does not contain any link -- not retrieving.\n\n"));
|
||||||
@ -2776,18 +2776,18 @@ Remote file exists but does not contain any link -- not retrieving.\n\n"));
|
|||||||
Remote file exists and could contain further links,\n\
|
Remote file exists and could contain further links,\n\
|
||||||
but recursion is disabled -- not retrieving.\n\n"));
|
but recursion is disabled -- not retrieving.\n\n"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, _("\
|
logprintf (LOG_VERBOSE, _("\
|
||||||
Remote file exists.\n\n"));
|
Remote file exists.\n\n"));
|
||||||
}
|
}
|
||||||
ret = RETROK; /* RETRUNNEEDED is not for caller. */
|
ret = RETROK; /* RETRUNNEEDED is not for caller. */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finished)
|
if (finished)
|
||||||
{
|
{
|
||||||
logprintf (LOG_NONVERBOSE,
|
logprintf (LOG_NONVERBOSE,
|
||||||
_("%s URL: %s %2d %s\n"),
|
_("%s URL: %s %2d %s\n"),
|
||||||
tms, u->url, hstat.statcode,
|
tms, u->url, hstat.statcode,
|
||||||
hstat.message ? quotearg_style (escape_quoting_style, hstat.message) : "");
|
hstat.message ? quotearg_style (escape_quoting_style, hstat.message) : "");
|
||||||
goto exit;
|
goto exit;
|
||||||
@ -2800,7 +2800,7 @@ Remote file exists.\n\n"));
|
|||||||
continue;
|
continue;
|
||||||
} /* send_head_first */
|
} /* send_head_first */
|
||||||
} /* !got_head */
|
} /* !got_head */
|
||||||
|
|
||||||
if ((tmr != (time_t) (-1))
|
if ((tmr != (time_t) (-1))
|
||||||
&& ((hstat.len == hstat.contlen) ||
|
&& ((hstat.len == hstat.contlen) ||
|
||||||
((hstat.res == 0) && (hstat.contlen == -1))))
|
((hstat.res == 0) && (hstat.contlen == -1))))
|
||||||
@ -2833,7 +2833,7 @@ Remote file exists.\n\n"));
|
|||||||
bool write_to_stdout = (opt.output_document && HYPHENP (opt.output_document));
|
bool write_to_stdout = (opt.output_document && HYPHENP (opt.output_document));
|
||||||
|
|
||||||
logprintf (LOG_VERBOSE,
|
logprintf (LOG_VERBOSE,
|
||||||
write_to_stdout
|
write_to_stdout
|
||||||
? _("%s (%s) - written to stdout %s[%s/%s]\n\n")
|
? _("%s (%s) - written to stdout %s[%s/%s]\n\n")
|
||||||
: _("%s (%s) - %s saved [%s/%s]\n\n"),
|
: _("%s (%s) - %s saved [%s/%s]\n\n"),
|
||||||
tms, tmrate,
|
tms, tmrate,
|
||||||
@ -2862,7 +2862,7 @@ Remote file exists.\n\n"));
|
|||||||
else if (hstat.res == 0) /* No read error */
|
else if (hstat.res == 0) /* No read error */
|
||||||
{
|
{
|
||||||
if (hstat.contlen == -1) /* We don't know how much we were supposed
|
if (hstat.contlen == -1) /* We don't know how much we were supposed
|
||||||
to get, so assume we succeeded. */
|
to get, so assume we succeeded. */
|
||||||
{
|
{
|
||||||
if (*dt & RETROKF)
|
if (*dt & RETROKF)
|
||||||
{
|
{
|
||||||
@ -2872,7 +2872,7 @@ Remote file exists.\n\n"));
|
|||||||
write_to_stdout
|
write_to_stdout
|
||||||
? _("%s (%s) - written to stdout %s[%s]\n\n")
|
? _("%s (%s) - written to stdout %s[%s]\n\n")
|
||||||
: _("%s (%s) - %s saved [%s]\n\n"),
|
: _("%s (%s) - %s saved [%s]\n\n"),
|
||||||
tms, tmrate,
|
tms, tmrate,
|
||||||
write_to_stdout ? "" : quote (hstat.local_file),
|
write_to_stdout ? "" : quote (hstat.local_file),
|
||||||
number_to_static_string (hstat.len));
|
number_to_static_string (hstat.len));
|
||||||
logprintf (LOG_NONVERBOSE,
|
logprintf (LOG_NONVERBOSE,
|
||||||
@ -2888,7 +2888,7 @@ Remote file exists.\n\n"));
|
|||||||
downloaded_file(FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED, hstat.local_file);
|
downloaded_file(FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED, hstat.local_file);
|
||||||
else
|
else
|
||||||
downloaded_file(FILE_DOWNLOADED_NORMALLY, hstat.local_file);
|
downloaded_file(FILE_DOWNLOADED_NORMALLY, hstat.local_file);
|
||||||
|
|
||||||
ret = RETROK;
|
ret = RETROK;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -2942,10 +2942,10 @@ Remote file exists.\n\n"));
|
|||||||
while (!opt.ntry || (count < opt.ntry));
|
while (!opt.ntry || (count < opt.ntry));
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if (ret == RETROK)
|
if (ret == RETROK)
|
||||||
*local_file = xstrdup (hstat.local_file);
|
*local_file = xstrdup (hstat.local_file);
|
||||||
free_hstat (&hstat);
|
free_hstat (&hstat);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3355,7 +3355,7 @@ test_parse_content_disposition()
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct {
|
struct {
|
||||||
char *hdrval;
|
char *hdrval;
|
||||||
char *opt_dir_prefix;
|
char *opt_dir_prefix;
|
||||||
char *filename;
|
char *filename;
|
||||||
bool result;
|
bool result;
|
||||||
@ -3369,8 +3369,8 @@ test_parse_content_disposition()
|
|||||||
{ "attachment", NULL, NULL, false },
|
{ "attachment", NULL, NULL, false },
|
||||||
{ "attachment", "somedir", NULL, false },
|
{ "attachment", "somedir", NULL, false },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
bool res;
|
bool res;
|
||||||
@ -3378,9 +3378,9 @@ test_parse_content_disposition()
|
|||||||
opt.dir_prefix = test_array[i].opt_dir_prefix;
|
opt.dir_prefix = test_array[i].opt_dir_prefix;
|
||||||
res = parse_content_disposition (test_array[i].hdrval, &filename);
|
res = parse_content_disposition (test_array[i].hdrval, &filename);
|
||||||
|
|
||||||
mu_assert ("test_parse_content_disposition: wrong result",
|
mu_assert ("test_parse_content_disposition: wrong result",
|
||||||
res == test_array[i].result
|
res == test_array[i].result
|
||||||
&& (res == false
|
&& (res == false
|
||||||
|| 0 == strcmp (test_array[i].filename, filename)));
|
|| 0 == strcmp (test_array[i].filename, filename)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
38
src/init.c
38
src/init.c
@ -391,12 +391,12 @@ home_dir (void)
|
|||||||
return home ? xstrdup (home) : NULL;
|
return home ? xstrdup (home) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check the 'WGETRC' environment variable and return the file name
|
/* Check the 'WGETRC' environment variable and return the file name
|
||||||
if 'WGETRC' is set and is a valid file.
|
if 'WGETRC' is set and is a valid file.
|
||||||
If the `WGETRC' variable exists but the file does not exist, the
|
If the `WGETRC' variable exists but the file does not exist, the
|
||||||
function will exit(). */
|
function will exit(). */
|
||||||
char *
|
char *
|
||||||
wgetrc_env_file_name (void)
|
wgetrc_env_file_name (void)
|
||||||
{
|
{
|
||||||
char *env = getenv ("WGETRC");
|
char *env = getenv ("WGETRC");
|
||||||
if (env && *env)
|
if (env && *env)
|
||||||
@ -415,7 +415,7 @@ wgetrc_env_file_name (void)
|
|||||||
/* Check for the existance of '$HOME/.wgetrc' and return it's path
|
/* Check for the existance of '$HOME/.wgetrc' and return it's path
|
||||||
if it exists and is set. */
|
if it exists and is set. */
|
||||||
char *
|
char *
|
||||||
wgetrc_user_file_name (void)
|
wgetrc_user_file_name (void)
|
||||||
{
|
{
|
||||||
char *home = home_dir ();
|
char *home = home_dir ();
|
||||||
char *file = NULL;
|
char *file = NULL;
|
||||||
@ -443,7 +443,7 @@ wgetrc_user_file_name (void)
|
|||||||
/* Return the path to the user's .wgetrc. This is either the value of
|
/* Return the path to the user's .wgetrc. This is either the value of
|
||||||
`WGETRC' environment variable, or `$HOME/.wgetrc'.
|
`WGETRC' environment variable, or `$HOME/.wgetrc'.
|
||||||
|
|
||||||
Additionally, for windows, look in the directory where wget.exe
|
Additionally, for windows, look in the directory where wget.exe
|
||||||
resides. */
|
resides. */
|
||||||
char *
|
char *
|
||||||
wgetrc_file_name (void)
|
wgetrc_file_name (void)
|
||||||
@ -451,7 +451,7 @@ wgetrc_file_name (void)
|
|||||||
char *file = wgetrc_env_file_name ();
|
char *file = wgetrc_env_file_name ();
|
||||||
if (file && *file)
|
if (file && *file)
|
||||||
return file;
|
return file;
|
||||||
|
|
||||||
file = wgetrc_user_file_name ();
|
file = wgetrc_user_file_name ();
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
@ -564,8 +564,8 @@ initialize (void)
|
|||||||
|
|
||||||
/* Load the hard-coded defaults. */
|
/* Load the hard-coded defaults. */
|
||||||
defaults ();
|
defaults ();
|
||||||
|
|
||||||
/* Run a non-standard system rc file when the according environment
|
/* Run a non-standard system rc file when the according environment
|
||||||
variable has been set. For internal testing purposes only! */
|
variable has been set. For internal testing purposes only! */
|
||||||
env_sysrc = getenv ("SYSTEM_WGETRC");
|
env_sysrc = getenv ("SYSTEM_WGETRC");
|
||||||
if (env_sysrc && file_exists_p (env_sysrc))
|
if (env_sysrc && file_exists_p (env_sysrc))
|
||||||
@ -1310,7 +1310,7 @@ cmd_spec_restrict_file_names (const char *com, const char *val, void *place_igno
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*end)
|
if (*end)
|
||||||
val = end + 1;
|
val = end + 1;
|
||||||
}
|
}
|
||||||
while (*val && *end);
|
while (*val && *end);
|
||||||
@ -1321,7 +1321,7 @@ cmd_spec_restrict_file_names (const char *com, const char *val, void *place_igno
|
|||||||
opt.restrict_files_ctrl = restrict_ctrl;
|
opt.restrict_files_ctrl = restrict_ctrl;
|
||||||
opt.restrict_files_case = restrict_case;
|
opt.restrict_files_case = restrict_case;
|
||||||
opt.restrict_files_nonascii = restrict_nonascii;
|
opt.restrict_files_nonascii = restrict_nonascii;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1601,7 +1601,7 @@ cleanup (void)
|
|||||||
xfree_null (opt.user);
|
xfree_null (opt.user);
|
||||||
xfree_null (opt.passwd);
|
xfree_null (opt.passwd);
|
||||||
xfree_null (opt.base_href);
|
xfree_null (opt.base_href);
|
||||||
|
|
||||||
#endif /* DEBUG_MALLOC */
|
#endif /* DEBUG_MALLOC */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1622,9 +1622,9 @@ test_commands_sorted()
|
|||||||
{
|
{
|
||||||
mu_assert ("FAILED", false);
|
mu_assert ("FAILED", false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
prev_idx ++;
|
prev_idx ++;
|
||||||
next_idx ++;
|
next_idx ++;
|
||||||
}
|
}
|
||||||
@ -1648,11 +1648,11 @@ test_cmd_spec_restrict_file_names()
|
|||||||
{ "windows,lowercase", restrict_windows, true, restrict_lowercase, true },
|
{ "windows,lowercase", restrict_windows, true, restrict_lowercase, true },
|
||||||
{ "unix,nocontrol,lowercase,", restrict_unix, false, restrict_lowercase, true },
|
{ "unix,nocontrol,lowercase,", restrict_unix, false, restrict_lowercase, true },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
||||||
{
|
{
|
||||||
bool res;
|
bool res;
|
||||||
|
|
||||||
defaults();
|
defaults();
|
||||||
res = cmd_spec_restrict_file_names ("dummy", test_array[i].val, NULL);
|
res = cmd_spec_restrict_file_names ("dummy", test_array[i].val, NULL);
|
||||||
|
|
||||||
@ -1662,10 +1662,10 @@ test_cmd_spec_restrict_file_names()
|
|||||||
fprintf (stderr, "opt.restrict_files_ctrl: %d\n", opt.restrict_files_ctrl); fflush (stderr);
|
fprintf (stderr, "opt.restrict_files_ctrl: %d\n", opt.restrict_files_ctrl); fflush (stderr);
|
||||||
fprintf (stderr, "opt.restrict_files_case: %d\n", opt.restrict_files_case); fflush (stderr);
|
fprintf (stderr, "opt.restrict_files_case: %d\n", opt.restrict_files_case); fflush (stderr);
|
||||||
*/
|
*/
|
||||||
mu_assert ("test_cmd_spec_restrict_file_names: wrong result",
|
mu_assert ("test_cmd_spec_restrict_file_names: wrong result",
|
||||||
res == test_array[i].result
|
res == test_array[i].result
|
||||||
&& opt.restrict_files_os == test_array[i].expected_restrict_files_os
|
&& opt.restrict_files_os == test_array[i].expected_restrict_files_os
|
||||||
&& opt.restrict_files_ctrl == test_array[i].expected_restrict_files_ctrl
|
&& opt.restrict_files_ctrl == test_array[i].expected_restrict_files_ctrl
|
||||||
&& opt.restrict_files_case == test_array[i].expected_restrict_files_case);
|
&& opt.restrict_files_case == test_array[i].expected_restrict_files_case);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ as that of the covered work. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <stringprep.h>
|
#include <stringprep.h>
|
||||||
@ -138,7 +137,7 @@ locale_to_utf8 (const char *str)
|
|||||||
|
|
||||||
l2u = iconv_open ("UTF-8", opt.locale);
|
l2u = iconv_open ("UTF-8", opt.locale);
|
||||||
if (l2u != (iconv_t)(-1))
|
if (l2u != (iconv_t)(-1))
|
||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, _("Conversion from %s to %s isn't supported\n"),
|
logprintf (LOG_VERBOSE, _("Conversion from %s to %s isn't supported\n"),
|
||||||
quote (opt.locale), quote ("UTF-8"));
|
quote (opt.locale), quote ("UTF-8"));
|
||||||
return str;
|
return str;
|
||||||
|
34
src/main.c
34
src/main.c
@ -737,11 +737,11 @@ prompt_for_password (void)
|
|||||||
lines.*/
|
lines.*/
|
||||||
static void
|
static void
|
||||||
format_and_print_line (const char *prefix, const char *line,
|
format_and_print_line (const char *prefix, const char *line,
|
||||||
int line_length)
|
int line_length)
|
||||||
{
|
{
|
||||||
int remaining_chars;
|
int remaining_chars;
|
||||||
char *line_dup, *token;
|
char *line_dup, *token;
|
||||||
|
|
||||||
assert (prefix != NULL);
|
assert (prefix != NULL);
|
||||||
assert (line != NULL);
|
assert (line != NULL);
|
||||||
|
|
||||||
@ -754,12 +754,12 @@ format_and_print_line (const char *prefix, const char *line,
|
|||||||
remaining_chars = line_length;
|
remaining_chars = line_length;
|
||||||
/* We break on spaces. */
|
/* We break on spaces. */
|
||||||
token = strtok (line_dup, " ");
|
token = strtok (line_dup, " ");
|
||||||
while (token != NULL)
|
while (token != NULL)
|
||||||
{
|
{
|
||||||
/* If however a token is much larger than the maximum
|
/* If however a token is much larger than the maximum
|
||||||
line length, all bets are off and we simply print the
|
line length, all bets are off and we simply print the
|
||||||
token on the next line. */
|
token on the next line. */
|
||||||
if (remaining_chars <= strlen (token))
|
if (remaining_chars <= strlen (token))
|
||||||
{
|
{
|
||||||
printf ("\n%*c", TABULATION, ' ');
|
printf ("\n%*c", TABULATION, ' ');
|
||||||
remaining_chars = line_length - TABULATION;
|
remaining_chars = line_length - TABULATION;
|
||||||
@ -794,10 +794,10 @@ print_version (void)
|
|||||||
/* compiled_features is a char*[]. We limit the characters per
|
/* compiled_features is a char*[]. We limit the characters per
|
||||||
line to MAX_CHARS_PER_LINE and prefix each line with a constant
|
line to MAX_CHARS_PER_LINE and prefix each line with a constant
|
||||||
number of spaces for proper alignment. */
|
number of spaces for proper alignment. */
|
||||||
for (i = 0; compiled_features[i] != NULL; )
|
for (i = 0; compiled_features[i] != NULL; )
|
||||||
{
|
{
|
||||||
int line_length = MAX_CHARS_PER_LINE;
|
int line_length = MAX_CHARS_PER_LINE;
|
||||||
while ((line_length > 0) && (compiled_features[i] != NULL))
|
while ((line_length > 0) && (compiled_features[i] != NULL))
|
||||||
{
|
{
|
||||||
printf ("%s ", compiled_features[i]);
|
printf ("%s ", compiled_features[i]);
|
||||||
line_length -= strlen (compiled_features[i]) + 2;
|
line_length -= strlen (compiled_features[i]) + 2;
|
||||||
@ -806,17 +806,17 @@ print_version (void)
|
|||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
/* Handle the case when $WGETRC is unset and $HOME/.wgetrc is
|
/* Handle the case when $WGETRC is unset and $HOME/.wgetrc is
|
||||||
absent. */
|
absent. */
|
||||||
printf ("%s\n", wgetrc_title);
|
printf ("%s\n", wgetrc_title);
|
||||||
env_wgetrc = wgetrc_env_file_name ();
|
env_wgetrc = wgetrc_env_file_name ();
|
||||||
if (env_wgetrc && *env_wgetrc)
|
if (env_wgetrc && *env_wgetrc)
|
||||||
{
|
{
|
||||||
printf (_(" %s (env)\n"), env_wgetrc);
|
printf (_(" %s (env)\n"), env_wgetrc);
|
||||||
xfree (env_wgetrc);
|
xfree (env_wgetrc);
|
||||||
}
|
}
|
||||||
user_wgetrc = wgetrc_user_file_name ();
|
user_wgetrc = wgetrc_user_file_name ();
|
||||||
if (user_wgetrc)
|
if (user_wgetrc)
|
||||||
{
|
{
|
||||||
printf (_(" %s (user)\n"), user_wgetrc);
|
printf (_(" %s (user)\n"), user_wgetrc);
|
||||||
xfree (user_wgetrc);
|
xfree (user_wgetrc);
|
||||||
@ -830,7 +830,7 @@ print_version (void)
|
|||||||
LOCALEDIR,
|
LOCALEDIR,
|
||||||
MAX_CHARS_PER_LINE);
|
MAX_CHARS_PER_LINE);
|
||||||
#endif /* def ENABLE_NLS */
|
#endif /* def ENABLE_NLS */
|
||||||
|
|
||||||
format_and_print_line (compile_title,
|
format_and_print_line (compile_title,
|
||||||
compilation_string,
|
compilation_string,
|
||||||
MAX_CHARS_PER_LINE);
|
MAX_CHARS_PER_LINE);
|
||||||
@ -1050,7 +1050,7 @@ Can't timestamp and not clobber old files at the same time.\n"));
|
|||||||
#endif
|
#endif
|
||||||
if (opt.output_document)
|
if (opt.output_document)
|
||||||
{
|
{
|
||||||
if (opt.convert_links
|
if (opt.convert_links
|
||||||
&& (nurl > 1 || opt.page_requisites || opt.recursive))
|
&& (nurl > 1 || opt.page_requisites || opt.recursive))
|
||||||
{
|
{
|
||||||
fputs (_("\
|
fputs (_("\
|
||||||
@ -1073,12 +1073,12 @@ WARNING: timestamping does nothing in combination with -O. See the manual\n\
|
|||||||
for details.\n\n"));
|
for details.\n\n"));
|
||||||
opt.timestamping = false;
|
opt.timestamping = false;
|
||||||
}
|
}
|
||||||
if (opt.noclobber && file_exists_p(opt.output_document))
|
if (opt.noclobber && file_exists_p(opt.output_document))
|
||||||
{
|
{
|
||||||
/* Check if output file exists; if it does, exit. */
|
/* Check if output file exists; if it does, exit. */
|
||||||
logprintf (LOG_VERBOSE, _("File `%s' already there; not retrieving.\n"), opt.output_document);
|
logprintf (LOG_VERBOSE, _("File `%s' already there; not retrieving.\n"), opt.output_document);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt.ask_passwd && opt.passwd)
|
if (opt.ask_passwd && opt.passwd)
|
||||||
@ -1282,9 +1282,9 @@ WARNING: Can't reopen standard output in binary mode;\n\
|
|||||||
int old_follow_ftp = opt.follow_ftp;
|
int old_follow_ftp = opt.follow_ftp;
|
||||||
|
|
||||||
/* Turn opt.follow_ftp on in case of recursive FTP retrieval */
|
/* Turn opt.follow_ftp on in case of recursive FTP retrieval */
|
||||||
if (url_scheme (*t) == SCHEME_FTP)
|
if (url_scheme (*t) == SCHEME_FTP)
|
||||||
opt.follow_ftp = 1;
|
opt.follow_ftp = 1;
|
||||||
|
|
||||||
status = retrieve_tree (url_parsed, NULL);
|
status = retrieve_tree (url_parsed, NULL);
|
||||||
|
|
||||||
opt.follow_ftp = old_follow_ftp;
|
opt.follow_ftp = old_follow_ftp;
|
||||||
@ -1324,7 +1324,7 @@ WARNING: Can't reopen standard output in binary mode;\n\
|
|||||||
{
|
{
|
||||||
print_broken_links();
|
print_broken_links();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print the downloaded sum. */
|
/* Print the downloaded sum. */
|
||||||
if ((opt.recursive || opt.page_requisites
|
if ((opt.recursive || opt.page_requisites
|
||||||
|| nurl > 1
|
|| nurl > 1
|
||||||
|
@ -35,7 +35,6 @@ as that of the covered work. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ static void
|
|||||||
shift_left(char *string)
|
shift_left(char *string)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
for (p=string; *p; ++p)
|
for (p=string; *p; ++p)
|
||||||
*p = *(p+1);
|
*p = *(p+1);
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ init_prng (void)
|
|||||||
/* Print errors in the OpenSSL error stack. */
|
/* Print errors in the OpenSSL error stack. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_errors (void)
|
print_errors (void)
|
||||||
{
|
{
|
||||||
unsigned long err;
|
unsigned long err;
|
||||||
while ((err = ERR_get_error ()) != 0)
|
while ((err = ERR_get_error ()) != 0)
|
||||||
@ -390,7 +390,7 @@ static struct transport_implementation openssl_transport = {
|
|||||||
Returns true on success, false on failure. */
|
Returns true on success, false on failure. */
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ssl_connect_wget (int fd)
|
ssl_connect_wget (int fd)
|
||||||
{
|
{
|
||||||
SSL *conn;
|
SSL *conn;
|
||||||
struct openssl_transport_context *ctx;
|
struct openssl_transport_context *ctx;
|
||||||
@ -512,7 +512,7 @@ ssl_check_certificate (int fd, const char *host)
|
|||||||
char *subject = X509_NAME_oneline (X509_get_subject_name (cert), 0, 0);
|
char *subject = X509_NAME_oneline (X509_get_subject_name (cert), 0, 0);
|
||||||
char *issuer = X509_NAME_oneline (X509_get_issuer_name (cert), 0, 0);
|
char *issuer = X509_NAME_oneline (X509_get_issuer_name (cert), 0, 0);
|
||||||
DEBUGP (("certificate:\n subject: %s\n issuer: %s\n",
|
DEBUGP (("certificate:\n subject: %s\n issuer: %s\n",
|
||||||
quotearg_style (escape_quoting_style, subject),
|
quotearg_style (escape_quoting_style, subject),
|
||||||
quotearg_style (escape_quoting_style, issuer)));
|
quotearg_style (escape_quoting_style, issuer)));
|
||||||
OPENSSL_free (subject);
|
OPENSSL_free (subject);
|
||||||
OPENSSL_free (issuer);
|
OPENSSL_free (issuer);
|
||||||
@ -524,7 +524,7 @@ ssl_check_certificate (int fd, const char *host)
|
|||||||
char *issuer = X509_NAME_oneline (X509_get_issuer_name (cert), 0, 0);
|
char *issuer = X509_NAME_oneline (X509_get_issuer_name (cert), 0, 0);
|
||||||
logprintf (LOG_NOTQUIET,
|
logprintf (LOG_NOTQUIET,
|
||||||
_("%s: cannot verify %s's certificate, issued by %s:\n"),
|
_("%s: cannot verify %s's certificate, issued by %s:\n"),
|
||||||
severity, quotearg_style (escape_quoting_style, host),
|
severity, quotearg_style (escape_quoting_style, host),
|
||||||
quote (issuer));
|
quote (issuer));
|
||||||
/* Try to print more user-friendly (and translated) messages for
|
/* Try to print more user-friendly (and translated) messages for
|
||||||
the frequent verification errors. */
|
the frequent verification errors. */
|
||||||
@ -605,7 +605,7 @@ ssl_check_certificate (int fd, const char *host)
|
|||||||
|
|
||||||
xentry = X509_NAME_get_entry(xname,i);
|
xentry = X509_NAME_get_entry(xname,i);
|
||||||
sdata = X509_NAME_ENTRY_get_data(xentry);
|
sdata = X509_NAME_ENTRY_get_data(xentry);
|
||||||
if (strlen (common_name) != ASN1_STRING_length (sdata))
|
if (strlen (common_name) != ASN1_STRING_length (sdata))
|
||||||
{
|
{
|
||||||
logprintf (LOG_NOTQUIET, _("\
|
logprintf (LOG_NOTQUIET, _("\
|
||||||
%s: certificate common name is invalid (contains a NUL character).\n\
|
%s: certificate common name is invalid (contains a NUL character).\n\
|
||||||
@ -615,7 +615,7 @@ This may be an indication that the host is not who it claims to be\n\
|
|||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
DEBUGP (("X509 certificate successfully verified and matches host %s\n",
|
DEBUGP (("X509 certificate successfully verified and matches host %s\n",
|
||||||
|
@ -88,7 +88,7 @@ struct options
|
|||||||
char *user; /* Generic username */
|
char *user; /* Generic username */
|
||||||
char *passwd; /* Generic password */
|
char *passwd; /* Generic password */
|
||||||
bool ask_passwd; /* Ask for password? */
|
bool ask_passwd; /* Ask for password? */
|
||||||
|
|
||||||
bool always_rest; /* Always use REST. */
|
bool always_rest; /* Always use REST. */
|
||||||
char *ftp_user; /* FTP username */
|
char *ftp_user; /* FTP username */
|
||||||
char *ftp_passwd; /* FTP password */
|
char *ftp_passwd; /* FTP password */
|
||||||
@ -233,7 +233,7 @@ struct options
|
|||||||
prefer_none
|
prefer_none
|
||||||
} prefer_family; /* preferred address family when more
|
} prefer_family; /* preferred address family when more
|
||||||
than one type is available */
|
than one type is available */
|
||||||
|
|
||||||
bool content_disposition; /* Honor HTTP Content-Disposition header. */
|
bool content_disposition; /* Honor HTTP Content-Disposition header. */
|
||||||
bool auth_without_challenge; /* Issue Basic authentication creds without
|
bool auth_without_challenge; /* Issue Basic authentication creds without
|
||||||
waiting for a challenge. */
|
waiting for a challenge. */
|
||||||
|
@ -715,7 +715,7 @@ update_speed_ring (struct bar_progress *bp, wgint howmuch, double dltime)
|
|||||||
if (bp->stalled)
|
if (bp->stalled)
|
||||||
{
|
{
|
||||||
bp->stalled = false;
|
bp->stalled = false;
|
||||||
/* "recent_age" includes the the entired stalled period, which
|
/* "recent_age" includes the entired stalled period, which
|
||||||
could be very long. Don't update the speed ring with that
|
could be very long. Don't update the speed ring with that
|
||||||
value because the current bandwidth would start too small.
|
value because the current bandwidth would start too small.
|
||||||
Start with an arbitrary (but more reasonable) time value and
|
Start with an arbitrary (but more reasonable) time value and
|
||||||
|
@ -353,7 +353,7 @@ ptimer_reset (struct ptimer *pt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Measure the elapsed time since timer creation/reset. This causes
|
/* Measure the elapsed time since timer creation/reset. This causes
|
||||||
the timer to internally call clock_gettime (or gettimeofday, etc.)
|
the timer to internally call clock_gettime (or gettimeofday, etc.)
|
||||||
to update its idea of current time. The time is returned, but is
|
to update its idea of current time. The time is returned, but is
|
||||||
also stored for later access through ptimer_read().
|
also stored for later access through ptimer_read().
|
||||||
|
|
||||||
|
@ -590,7 +590,7 @@ is_robots_txt_url (const char *url)
|
|||||||
bool ret = are_urls_equal (url, robots_url);
|
bool ret = are_urls_equal (url, robots_url);
|
||||||
|
|
||||||
xfree (robots_url);
|
xfree (robots_url);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -626,10 +626,10 @@ test_is_robots_txt_url()
|
|||||||
{ "http://www.yoyodyne.com/somepath/", false },
|
{ "http://www.yoyodyne.com/somepath/", false },
|
||||||
{ "http://www.yoyodyne.com/somepath/robots.txt", false },
|
{ "http://www.yoyodyne.com/somepath/robots.txt", false },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
||||||
{
|
{
|
||||||
mu_assert ("test_is_robots_txt_url: wrong result",
|
mu_assert ("test_is_robots_txt_url: wrong result",
|
||||||
is_robots_txt_url (test_array[i].url) == test_array[i].expected_result);
|
is_robots_txt_url (test_array[i].url) == test_array[i].expected_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
114
src/snprintf.c
114
src/snprintf.c
@ -44,9 +44,9 @@
|
|||||||
* original. Also, there is now a builtin-test, just compile with:
|
* original. Also, there is now a builtin-test, just compile with:
|
||||||
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
||||||
* and run snprintf for results.
|
* and run snprintf for results.
|
||||||
*
|
*
|
||||||
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
||||||
* The PGP code was using unsigned hexadecimal formats.
|
* The PGP code was using unsigned hexadecimal formats.
|
||||||
* Unfortunately, unsigned formats simply didn't work.
|
* Unfortunately, unsigned formats simply didn't work.
|
||||||
*
|
*
|
||||||
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
||||||
@ -188,7 +188,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
int cflags;
|
int cflags;
|
||||||
int total;
|
int total;
|
||||||
size_t currlen;
|
size_t currlen;
|
||||||
|
|
||||||
state = DP_S_DEFAULT;
|
state = DP_S_DEFAULT;
|
||||||
currlen = flags = cflags = min = 0;
|
currlen = flags = cflags = min = 0;
|
||||||
max = -1;
|
max = -1;
|
||||||
@ -200,17 +200,17 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
if (ch == '\0')
|
if (ch == '\0')
|
||||||
state = DP_S_DONE;
|
state = DP_S_DONE;
|
||||||
|
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DP_S_DEFAULT:
|
case DP_S_DEFAULT:
|
||||||
if (ch == '%')
|
if (ch == '%')
|
||||||
state = DP_S_FLAGS;
|
state = DP_S_FLAGS;
|
||||||
else
|
else
|
||||||
total += dopr_outch (buffer, &currlen, maxlen, ch);
|
total += dopr_outch (buffer, &currlen, maxlen, ch);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
case DP_S_FLAGS:
|
case DP_S_FLAGS:
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case '-':
|
case '-':
|
||||||
flags |= DP_F_MINUS;
|
flags |= DP_F_MINUS;
|
||||||
@ -242,23 +242,23 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
{
|
{
|
||||||
min = 10*min + char_to_int (ch);
|
min = 10*min + char_to_int (ch);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
}
|
}
|
||||||
else if (ch == '*')
|
else if (ch == '*')
|
||||||
{
|
{
|
||||||
min = va_arg (args, int);
|
min = va_arg (args, int);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
state = DP_S_DOT;
|
state = DP_S_DOT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
state = DP_S_DOT;
|
state = DP_S_DOT;
|
||||||
break;
|
break;
|
||||||
case DP_S_DOT:
|
case DP_S_DOT:
|
||||||
if (ch == '.')
|
if (ch == '.')
|
||||||
{
|
{
|
||||||
state = DP_S_MAX;
|
state = DP_S_MAX;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
state = DP_S_MOD;
|
state = DP_S_MOD;
|
||||||
break;
|
break;
|
||||||
case DP_S_MAX:
|
case DP_S_MAX:
|
||||||
@ -268,18 +268,18 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
max = 0;
|
max = 0;
|
||||||
max = 10*max + char_to_int (ch);
|
max = 10*max + char_to_int (ch);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
}
|
}
|
||||||
else if (ch == '*')
|
else if (ch == '*')
|
||||||
{
|
{
|
||||||
max = va_arg (args, int);
|
max = va_arg (args, int);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
state = DP_S_MOD;
|
state = DP_S_MOD;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
state = DP_S_MOD;
|
state = DP_S_MOD;
|
||||||
break;
|
break;
|
||||||
case DP_S_MOD:
|
case DP_S_MOD:
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case 'h':
|
case 'h':
|
||||||
cflags = DP_C_SHORT;
|
cflags = DP_C_SHORT;
|
||||||
@ -314,11 +314,11 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
state = DP_S_CONV;
|
state = DP_S_CONV;
|
||||||
break;
|
break;
|
||||||
case DP_S_CONV:
|
case DP_S_CONV:
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
if (cflags == DP_C_SHORT)
|
if (cflags == DP_C_SHORT)
|
||||||
value = (short int) va_arg (args, int);
|
value = (short int) va_arg (args, int);
|
||||||
else if (cflags == DP_C_LONG)
|
else if (cflags == DP_C_LONG)
|
||||||
value = va_arg (args, long int);
|
value = va_arg (args, long int);
|
||||||
@ -408,25 +408,25 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
max, flags);
|
max, flags);
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
if (cflags == DP_C_SHORT)
|
if (cflags == DP_C_SHORT)
|
||||||
{
|
{
|
||||||
short int *num;
|
short int *num;
|
||||||
num = va_arg (args, short int *);
|
num = va_arg (args, short int *);
|
||||||
*num = currlen;
|
*num = currlen;
|
||||||
}
|
}
|
||||||
else if (cflags == DP_C_LONG)
|
else if (cflags == DP_C_LONG)
|
||||||
{
|
{
|
||||||
long int *num;
|
long int *num;
|
||||||
num = va_arg (args, long int *);
|
num = va_arg (args, long int *);
|
||||||
*num = currlen;
|
*num = currlen;
|
||||||
}
|
}
|
||||||
else if (cflags == DP_C_LLONG)
|
else if (cflags == DP_C_LLONG)
|
||||||
{
|
{
|
||||||
LLONG *num;
|
LLONG *num;
|
||||||
num = va_arg (args, LLONG *);
|
num = va_arg (args, LLONG *);
|
||||||
*num = currlen;
|
*num = currlen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int *num;
|
int *num;
|
||||||
num = va_arg (args, int *);
|
num = va_arg (args, int *);
|
||||||
@ -458,9 +458,9 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
}
|
}
|
||||||
if (buffer != NULL)
|
if (buffer != NULL)
|
||||||
{
|
{
|
||||||
if (currlen < maxlen - 1)
|
if (currlen < maxlen - 1)
|
||||||
buffer[currlen] = '\0';
|
buffer[currlen] = '\0';
|
||||||
else
|
else
|
||||||
buffer[maxlen - 1] = '\0';
|
buffer[maxlen - 1] = '\0';
|
||||||
}
|
}
|
||||||
return total;
|
return total;
|
||||||
@ -472,7 +472,7 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
int padlen, strln; /* amount to pad */
|
int padlen, strln; /* amount to pad */
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
{
|
{
|
||||||
value = "(null)";
|
value = "(null)";
|
||||||
@ -486,9 +486,9 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
for (strln = 0; strln < max && value[strln]; ++strln)
|
for (strln = 0; strln < max && value[strln]; ++strln)
|
||||||
;
|
;
|
||||||
padlen = min - strln;
|
padlen = min - strln;
|
||||||
if (padlen < 0)
|
if (padlen < 0)
|
||||||
padlen = 0;
|
padlen = 0;
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
padlen = -padlen; /* Left Justify */
|
padlen = -padlen; /* Left Justify */
|
||||||
|
|
||||||
while (padlen > 0)
|
while (padlen > 0)
|
||||||
@ -522,7 +522,7 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
int zpadlen = 0; /* amount to zero pad */
|
int zpadlen = 0; /* amount to zero pad */
|
||||||
const char *digits;
|
const char *digits;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|
||||||
if (max < 0)
|
if (max < 0)
|
||||||
max = 0;
|
max = 0;
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
if (flags & DP_F_SPACE)
|
if (flags & DP_F_SPACE)
|
||||||
signvalue = ' ';
|
signvalue = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & DP_F_UP)
|
if (flags & DP_F_UP)
|
||||||
/* Should characters be upper case? */
|
/* Should characters be upper case? */
|
||||||
digits = "0123456789ABCDEF";
|
digits = "0123456789ABCDEF";
|
||||||
@ -564,7 +564,7 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
zpadlen = MAX(zpadlen, spadlen);
|
zpadlen = MAX(zpadlen, spadlen);
|
||||||
spadlen = 0;
|
spadlen = 0;
|
||||||
}
|
}
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
spadlen = -spadlen; /* Left Justifty */
|
spadlen = -spadlen; /* Left Justifty */
|
||||||
|
|
||||||
#ifdef DEBUG_SNPRINTF
|
#ifdef DEBUG_SNPRINTF
|
||||||
@ -573,18 +573,18 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Spaces */
|
/* Spaces */
|
||||||
while (spadlen > 0)
|
while (spadlen > 0)
|
||||||
{
|
{
|
||||||
total += dopr_outch (buffer, currlen, maxlen, ' ');
|
total += dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
--spadlen;
|
--spadlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sign */
|
/* Sign */
|
||||||
if (signvalue)
|
if (signvalue)
|
||||||
total += dopr_outch (buffer, currlen, maxlen, signvalue);
|
total += dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
|
||||||
/* Zeros */
|
/* Zeros */
|
||||||
if (zpadlen > 0)
|
if (zpadlen > 0)
|
||||||
{
|
{
|
||||||
while (zpadlen > 0)
|
while (zpadlen > 0)
|
||||||
{
|
{
|
||||||
@ -594,9 +594,9 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Digits */
|
/* Digits */
|
||||||
while (place > 0)
|
while (place > 0)
|
||||||
total += dopr_outch (buffer, currlen, maxlen, convert[--place]);
|
total += dopr_outch (buffer, currlen, maxlen, convert[--place]);
|
||||||
|
|
||||||
/* Left Justified spaces */
|
/* Left Justified spaces */
|
||||||
while (spadlen < 0) {
|
while (spadlen < 0) {
|
||||||
total += dopr_outch (buffer, currlen, maxlen, ' ');
|
total += dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
@ -625,7 +625,7 @@ static LDOUBLE pow10_int (int exp)
|
|||||||
result *= 10;
|
result *= 10;
|
||||||
exp--;
|
exp--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -651,7 +651,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
int iplace = 0;
|
int iplace = 0;
|
||||||
int fplace = 0;
|
int fplace = 0;
|
||||||
int padlen = 0; /* amount to pad */
|
int padlen = 0; /* amount to pad */
|
||||||
int zpadlen = 0;
|
int zpadlen = 0;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
LLONG intpart;
|
LLONG intpart;
|
||||||
LLONG fracpart;
|
LLONG fracpart;
|
||||||
@ -659,8 +659,8 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
int leadingfrac0s = 0; /* zeros at the start of fractional part */
|
int leadingfrac0s = 0; /* zeros at the start of fractional part */
|
||||||
int omitzeros = 0;
|
int omitzeros = 0;
|
||||||
int omitcount = 0;
|
int omitcount = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* AIX manpage says the default is 0, but Solaris says the default
|
* AIX manpage says the default is 0, but Solaris says the default
|
||||||
* is 6, and sprintf on AIX defaults to 6
|
* is 6, and sprintf on AIX defaults to 6
|
||||||
*/
|
*/
|
||||||
@ -719,7 +719,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
# define MAX_DIGITS 9 /* just long */
|
# define MAX_DIGITS 9 /* just long */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sorry, we only support several digits past the decimal because of
|
* Sorry, we only support several digits past the decimal because of
|
||||||
* our conversion method
|
* our conversion method
|
||||||
*/
|
*/
|
||||||
@ -780,14 +780,14 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
zpadlen = max - fplace;
|
zpadlen = max - fplace;
|
||||||
if (zpadlen < 0)
|
if (zpadlen < 0)
|
||||||
zpadlen = 0;
|
zpadlen = 0;
|
||||||
if (padlen < 0)
|
if (padlen < 0)
|
||||||
padlen = 0;
|
padlen = 0;
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
padlen = -padlen; /* Left Justifty */
|
padlen = -padlen; /* Left Justifty */
|
||||||
|
|
||||||
if ((flags & DP_F_ZERO) && (padlen > 0))
|
if ((flags & DP_F_ZERO) && (padlen > 0))
|
||||||
{
|
{
|
||||||
if (signvalue)
|
if (signvalue)
|
||||||
{
|
{
|
||||||
total += dopr_outch (buffer, currlen, maxlen, signvalue);
|
total += dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
--padlen;
|
--padlen;
|
||||||
@ -804,10 +804,10 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
total += dopr_outch (buffer, currlen, maxlen, ' ');
|
total += dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
--padlen;
|
--padlen;
|
||||||
}
|
}
|
||||||
if (signvalue)
|
if (signvalue)
|
||||||
total += dopr_outch (buffer, currlen, maxlen, signvalue);
|
total += dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
|
||||||
while (iplace > 0)
|
while (iplace > 0)
|
||||||
total += dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
|
total += dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -818,7 +818,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
{
|
{
|
||||||
total += dopr_outch (buffer, currlen, maxlen, '.');
|
total += dopr_outch (buffer, currlen, maxlen, '.');
|
||||||
|
|
||||||
while (fplace > omitcount)
|
while (fplace > omitcount)
|
||||||
total += dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
|
total += dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -828,7 +828,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
--zpadlen;
|
--zpadlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (padlen < 0)
|
while (padlen < 0)
|
||||||
{
|
{
|
||||||
total += dopr_outch (buffer, currlen, maxlen, ' ');
|
total += dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
++padlen;
|
++padlen;
|
||||||
@ -912,7 +912,7 @@ int main (void)
|
|||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
|
double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
|
||||||
0.9996, 1.996, 4.136, 0.00205, 0.0001, 321.000009,
|
0.9996, 1.996, 4.136, 0.00205, 0.0001, 321.000009,
|
||||||
0};
|
0};
|
||||||
char *int_fmt[] = {
|
char *int_fmt[] = {
|
||||||
@ -963,7 +963,7 @@ int main (void)
|
|||||||
sprintf (buf2, fp_fmt[x], fp_nums[y]);
|
sprintf (buf2, fp_fmt[x], fp_nums[y]);
|
||||||
if (strcmp (buf1, buf2))
|
if (strcmp (buf1, buf2))
|
||||||
{
|
{
|
||||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
||||||
fp_fmt[x], buf1, buf2);
|
fp_fmt[x], buf1, buf2);
|
||||||
fail++;
|
fail++;
|
||||||
}
|
}
|
||||||
@ -977,7 +977,7 @@ int main (void)
|
|||||||
sprintf (buf2, int_fmt[x], int_nums[y]);
|
sprintf (buf2, int_fmt[x], int_nums[y]);
|
||||||
if (strcmp (buf1, buf2))
|
if (strcmp (buf1, buf2))
|
||||||
{
|
{
|
||||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
||||||
int_fmt[x], buf1, buf2);
|
int_fmt[x], buf1, buf2);
|
||||||
fail++;
|
fail++;
|
||||||
}
|
}
|
||||||
@ -992,7 +992,7 @@ int main (void)
|
|||||||
sprintf (buf2, llong_fmt[x], llong_nums[y]);
|
sprintf (buf2, llong_fmt[x], llong_nums[y]);
|
||||||
if (strcmp (buf1, buf2))
|
if (strcmp (buf1, buf2))
|
||||||
{
|
{
|
||||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
||||||
llong_fmt[x], buf1, buf2);
|
llong_fmt[x], buf1, buf2);
|
||||||
fail++;
|
fail++;
|
||||||
}
|
}
|
||||||
|
10
src/spider.c
10
src/spider.c
@ -68,26 +68,26 @@ print_broken_links (void)
|
|||||||
{
|
{
|
||||||
hash_table_iterator iter;
|
hash_table_iterator iter;
|
||||||
int num_elems;
|
int num_elems;
|
||||||
|
|
||||||
if (!nonexisting_urls_set)
|
if (!nonexisting_urls_set)
|
||||||
{
|
{
|
||||||
logprintf (LOG_NOTQUIET, _("Found no broken links.\n\n"));
|
logprintf (LOG_NOTQUIET, _("Found no broken links.\n\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
num_elems = hash_table_count (nonexisting_urls_set);
|
num_elems = hash_table_count (nonexisting_urls_set);
|
||||||
assert (num_elems > 0);
|
assert (num_elems > 0);
|
||||||
|
|
||||||
logprintf (LOG_NOTQUIET, ngettext("Found %d broken link.\n\n",
|
logprintf (LOG_NOTQUIET, ngettext("Found %d broken link.\n\n",
|
||||||
"Found %d broken links.\n\n", num_elems),
|
"Found %d broken links.\n\n", num_elems),
|
||||||
num_elems);
|
num_elems);
|
||||||
|
|
||||||
for (hash_table_iterate (nonexisting_urls_set, &iter);
|
for (hash_table_iterate (nonexisting_urls_set, &iter);
|
||||||
hash_table_iter_next (&iter); )
|
hash_table_iter_next (&iter); )
|
||||||
{
|
{
|
||||||
/* Struct url_list *list; */
|
/* Struct url_list *list; */
|
||||||
const char *url = (const char *) iter.key;
|
const char *url = (const char *) iter.key;
|
||||||
|
|
||||||
logprintf (LOG_NOTQUIET, _("%s\n"), url);
|
logprintf (LOG_NOTQUIET, _("%s\n"), url);
|
||||||
}
|
}
|
||||||
logputs (LOG_NOTQUIET, "\n");
|
logputs (LOG_NOTQUIET, "\n");
|
||||||
|
14
src/test.c
14
src/test.c
@ -60,32 +60,32 @@ all_tests()
|
|||||||
mu_run_test (test_append_uri_pathel);
|
mu_run_test (test_append_uri_pathel);
|
||||||
mu_run_test (test_are_urls_equal);
|
mu_run_test (test_are_urls_equal);
|
||||||
mu_run_test (test_is_robots_txt_url);
|
mu_run_test (test_is_robots_txt_url);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *program_name; /* Needed by lib/error.c. */
|
char *program_name; /* Needed by lib/error.c. */
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
const char *result;
|
const char *result;
|
||||||
|
|
||||||
program_name = argv[0];
|
program_name = argv[0];
|
||||||
|
|
||||||
result = all_tests();
|
result = all_tests();
|
||||||
|
|
||||||
if (result != NULL)
|
if (result != NULL)
|
||||||
{
|
{
|
||||||
puts (result);
|
puts (result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf ("ALL TESTS PASSED\n");
|
printf ("ALL TESTS PASSED\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("Tests run: %d\n", tests_run);
|
printf ("Tests run: %d\n", tests_run);
|
||||||
|
|
||||||
return result != 0;
|
return result != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
src/url.c
22
src/url.c
@ -1432,7 +1432,7 @@ append_uri_pathel (const char *b, const char *e, bool escaped,
|
|||||||
}
|
}
|
||||||
assert (q - TAIL (dest) == outlen);
|
assert (q - TAIL (dest) == outlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Perform inline case transformation if required. */
|
/* Perform inline case transformation if required. */
|
||||||
if (opt.restrict_files_case == restrict_lowercase
|
if (opt.restrict_files_case == restrict_lowercase
|
||||||
|| opt.restrict_files_case == restrict_uppercase)
|
|| opt.restrict_files_case == restrict_uppercase)
|
||||||
@ -1446,7 +1446,7 @@ append_uri_pathel (const char *b, const char *e, bool escaped,
|
|||||||
*q = c_toupper (*q);
|
*q = c_toupper (*q);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TAIL_INCR (dest, outlen);
|
TAIL_INCR (dest, outlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1507,7 +1507,7 @@ url_file_name (const struct url *u)
|
|||||||
/* If an alternative index file was defined, change index_filename */
|
/* If an alternative index file was defined, change index_filename */
|
||||||
if (opt.default_page)
|
if (opt.default_page)
|
||||||
index_filename = opt.default_page;
|
index_filename = opt.default_page;
|
||||||
|
|
||||||
|
|
||||||
/* Start with the directory prefix, if specified. */
|
/* Start with the directory prefix, if specified. */
|
||||||
if (opt.dir_prefix)
|
if (opt.dir_prefix)
|
||||||
@ -2019,7 +2019,7 @@ url_string (const struct url *url, enum url_auth_mode auth_mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return true if scheme a is similar to scheme b.
|
/* Return true if scheme a is similar to scheme b.
|
||||||
|
|
||||||
Schemes are similar if they are equal. If SSL is supported, schemes
|
Schemes are similar if they are equal. If SSL is supported, schemes
|
||||||
are also similar if one is http (SCHEME_HTTP) and the other is https
|
are also similar if one is http (SCHEME_HTTP) and the other is https
|
||||||
(SCHEME_HTTPS). */
|
(SCHEME_HTTPS). */
|
||||||
@ -2203,18 +2203,18 @@ test_append_uri_pathel()
|
|||||||
{ "http://www.yoyodyne.com/path/", "somepage.html", false, "http://www.yoyodyne.com/path/somepage.html" },
|
{ "http://www.yoyodyne.com/path/", "somepage.html", false, "http://www.yoyodyne.com/path/somepage.html" },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
||||||
{
|
{
|
||||||
struct growable dest;
|
struct growable dest;
|
||||||
const char *p = test_array[i].input;
|
const char *p = test_array[i].input;
|
||||||
|
|
||||||
memset (&dest, 0, sizeof (dest));
|
memset (&dest, 0, sizeof (dest));
|
||||||
|
|
||||||
append_string (test_array[i].original_url, &dest);
|
append_string (test_array[i].original_url, &dest);
|
||||||
append_uri_pathel (p, p + strlen(p), test_array[i].escaped, &dest);
|
append_uri_pathel (p, p + strlen(p), test_array[i].escaped, &dest);
|
||||||
append_char ('\0', &dest);
|
append_char ('\0', &dest);
|
||||||
|
|
||||||
mu_assert ("test_append_uri_pathel: wrong result",
|
mu_assert ("test_append_uri_pathel: wrong result",
|
||||||
strcmp (dest.base, test_array[i].expected_result) == 0);
|
strcmp (dest.base, test_array[i].expected_result) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2237,10 +2237,10 @@ test_are_urls_equal()
|
|||||||
{ "http://www.adomain.com/longer-path/", "http://www.adomain.com/path/", false },
|
{ "http://www.adomain.com/longer-path/", "http://www.adomain.com/path/", false },
|
||||||
{ "http://www.adomain.com/path%2f", "http://www.adomain.com/path/", false },
|
{ "http://www.adomain.com/path%2f", "http://www.adomain.com/path/", false },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
|
||||||
{
|
{
|
||||||
mu_assert ("test_are_urls_equal: wrong result",
|
mu_assert ("test_are_urls_equal: wrong result",
|
||||||
are_urls_equal (test_array[i].url1, test_array[i].url2) == test_array[i].expected_result);
|
are_urls_equal (test_array[i].url1, test_array[i].url2) == test_array[i].expected_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
30
src/utils.c
30
src/utils.c
@ -90,7 +90,7 @@ as that of the covered work. */
|
|||||||
|
|
||||||
#ifdef TESTING
|
#ifdef TESTING
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
memfatal (const char *context, long attempted_size)
|
memfatal (const char *context, long attempted_size)
|
||||||
@ -271,7 +271,7 @@ sepstring (const char *s)
|
|||||||
fallback implementation of vsnprintf, this should be portable. */
|
fallback implementation of vsnprintf, this should be portable. */
|
||||||
|
|
||||||
/* Constant is using for limits memory allocation for text buffer.
|
/* Constant is using for limits memory allocation for text buffer.
|
||||||
Applicable in situation when: vasprintf is not available in the system
|
Applicable in situation when: vasprintf is not available in the system
|
||||||
and vsnprintf return -1 when long line is truncated (in old versions of
|
and vsnprintf return -1 when long line is truncated (in old versions of
|
||||||
glibc and in other system where C99 doesn`t support) */
|
glibc and in other system where C99 doesn`t support) */
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ aprintf (const char *fmt, ...)
|
|||||||
else if (size >= FMT_MAX_LENGTH) /* We have a huge buffer, */
|
else if (size >= FMT_MAX_LENGTH) /* We have a huge buffer, */
|
||||||
{ /* maybe we have some wrong
|
{ /* maybe we have some wrong
|
||||||
format string? */
|
format string? */
|
||||||
logprintf (LOG_ALWAYS,
|
logprintf (LOG_ALWAYS,
|
||||||
_("%s: aprintf: text buffer is too big (%ld bytes), "
|
_("%s: aprintf: text buffer is too big (%ld bytes), "
|
||||||
"aborting.\n"),
|
"aborting.\n"),
|
||||||
exec_name, size); /* printout a log message */
|
exec_name, size); /* printout a log message */
|
||||||
@ -696,7 +696,7 @@ unique_create (const char *name, bool binary, char **opened_name)
|
|||||||
If opening the file fails for any reason, including the file having
|
If opening the file fails for any reason, including the file having
|
||||||
previously existed, this function returns NULL and sets errno
|
previously existed, this function returns NULL and sets errno
|
||||||
appropriately. */
|
appropriately. */
|
||||||
|
|
||||||
FILE *
|
FILE *
|
||||||
fopen_excl (const char *fname, int binary)
|
fopen_excl (const char *fname, int binary)
|
||||||
{
|
{
|
||||||
@ -890,7 +890,7 @@ acceptable (const char *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check if D2 is a subdirectory of D1. E.g. if D1 is `/something', subdir_p()
|
/* Check if D2 is a subdirectory of D1. E.g. if D1 is `/something', subdir_p()
|
||||||
will return true if and only if D2 begins with `/something/' or is exactly
|
will return true if and only if D2 begins with `/something/' or is exactly
|
||||||
'/something'. */
|
'/something'. */
|
||||||
bool
|
bool
|
||||||
subdir_p (const char *d1, const char *d2)
|
subdir_p (const char *d1, const char *d2)
|
||||||
@ -903,7 +903,7 @@ subdir_p (const char *d1, const char *d2)
|
|||||||
else
|
else
|
||||||
for (; *d1 && *d2 && (c_tolower (*d1) == c_tolower (*d2)); ++d1, ++d2)
|
for (; *d1 && *d2 && (c_tolower (*d1) == c_tolower (*d2)); ++d1, ++d2)
|
||||||
;
|
;
|
||||||
|
|
||||||
return *d1 == '\0' && (*d2 == '\0' || *d2 == '/');
|
return *d1 == '\0' && (*d2 == '\0' || *d2 == '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -932,7 +932,7 @@ dir_matches_p (char **dirlist, const char *dir)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return *x ? true : false;
|
return *x ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1069,7 +1069,7 @@ has_wildcards_p (const char *s)
|
|||||||
/* Return true if FNAME ends with a typical HTML suffix. The
|
/* Return true if FNAME ends with a typical HTML suffix. The
|
||||||
following (case-insensitive) suffixes are presumed to be HTML
|
following (case-insensitive) suffixes are presumed to be HTML
|
||||||
files:
|
files:
|
||||||
|
|
||||||
html
|
html
|
||||||
htm
|
htm
|
||||||
?html (`?' matches one character)
|
?html (`?' matches one character)
|
||||||
@ -2368,12 +2368,12 @@ test_subdir_p()
|
|||||||
{ "/somedir", "/somedir/d2", true },
|
{ "/somedir", "/somedir/d2", true },
|
||||||
{ "/somedir/d1", "/somedir", false },
|
{ "/somedir/d1", "/somedir", false },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < countof(test_array); ++i)
|
for (i = 0; i < countof(test_array); ++i)
|
||||||
{
|
{
|
||||||
bool res = subdir_p (test_array[i].d1, test_array[i].d2);
|
bool res = subdir_p (test_array[i].d1, test_array[i].d2);
|
||||||
|
|
||||||
mu_assert ("test_subdir_p: wrong result",
|
mu_assert ("test_subdir_p: wrong result",
|
||||||
res == test_array[i].result);
|
res == test_array[i].result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2405,12 +2405,12 @@ test_dir_matches_p()
|
|||||||
{ { "/Tmp/has", NULL, NULL }, "/Tmp/has space", false },
|
{ { "/Tmp/has", NULL, NULL }, "/Tmp/has space", false },
|
||||||
{ { "/Tmp/has", NULL, NULL }, "/Tmp/has,comma", false },
|
{ { "/Tmp/has", NULL, NULL }, "/Tmp/has,comma", false },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < countof(test_array); ++i)
|
for (i = 0; i < countof(test_array); ++i)
|
||||||
{
|
{
|
||||||
bool res = dir_matches_p (test_array[i].dirlist, test_array[i].dir);
|
bool res = dir_matches_p (test_array[i].dirlist, test_array[i].dir);
|
||||||
|
|
||||||
mu_assert ("test_dir_matches_p: wrong result",
|
mu_assert ("test_dir_matches_p: wrong result",
|
||||||
res == test_array[i].result);
|
res == test_array[i].result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
src/wget.h
12
src/wget.h
@ -332,20 +332,20 @@ typedef enum
|
|||||||
/* 0 */
|
/* 0 */
|
||||||
NOCONERROR, HOSTERR, CONSOCKERR, CONERROR, CONSSLERR,
|
NOCONERROR, HOSTERR, CONSOCKERR, CONERROR, CONSSLERR,
|
||||||
CONIMPOSSIBLE, NEWLOCATION, NOTENOUGHMEM /* ! */,
|
CONIMPOSSIBLE, NEWLOCATION, NOTENOUGHMEM /* ! */,
|
||||||
CONPORTERR /* ! */, CONCLOSED /* ! */,
|
CONPORTERR /* ! */, CONCLOSED /* ! */,
|
||||||
/* 10 */
|
/* 10 */
|
||||||
FTPOK, FTPLOGINC, FTPLOGREFUSED, FTPPORTERR, FTPSYSERR,
|
FTPOK, FTPLOGINC, FTPLOGREFUSED, FTPPORTERR, FTPSYSERR,
|
||||||
FTPNSFOD, FTPRETROK /* ! */, FTPUNKNOWNTYPE, FTPRERR, FTPREXC /* ! */,
|
FTPNSFOD, FTPRETROK /* ! */, FTPUNKNOWNTYPE, FTPRERR, FTPREXC /* ! */,
|
||||||
/* 20 */
|
/* 20 */
|
||||||
FTPSRVERR, FTPRETRINT, FTPRESTFAIL, URLERROR, FOPENERR,
|
FTPSRVERR, FTPRETRINT, FTPRESTFAIL, URLERROR, FOPENERR,
|
||||||
FOPEN_EXCL_ERR, FWRITEERR, HOK /* ! */, HLEXC /* ! */, HEOF,
|
FOPEN_EXCL_ERR, FWRITEERR, HOK /* ! */, HLEXC /* ! */, HEOF,
|
||||||
/* 30 */
|
/* 30 */
|
||||||
HERR, RETROK, RECLEVELEXC, FTPACCDENIED /* ! */, WRONGCODE,
|
HERR, RETROK, RECLEVELEXC, FTPACCDENIED /* ! */, WRONGCODE,
|
||||||
FTPINVPASV, FTPNOPASV, CONTNOTSUPPORTED, RETRUNNEEDED, RETRFINISHED,
|
FTPINVPASV, FTPNOPASV, CONTNOTSUPPORTED, RETRUNNEEDED, RETRFINISHED,
|
||||||
/* 40 */
|
/* 40 */
|
||||||
READERR, TRYLIMEXC, URLBADPATTERN /* ! */, FILEBADFILE /* ! */, RANGEERR,
|
READERR, TRYLIMEXC, URLBADPATTERN /* ! */, FILEBADFILE /* ! */, RANGEERR,
|
||||||
RETRBADPATTERN, RETNOTSUP /* ! */, ROBOTSOK /* ! */, NOROBOTS /* ! */,
|
RETRBADPATTERN, RETNOTSUP /* ! */, ROBOTSOK /* ! */, NOROBOTS /* ! */,
|
||||||
PROXERR,
|
PROXERR,
|
||||||
/* 50 */
|
/* 50 */
|
||||||
AUTHFAILED, QUOTEXC, WRITEFAILED, SSLINITFAILED, VERIFCERTERR
|
AUTHFAILED, QUOTEXC, WRITEFAILED, SSLINITFAILED, VERIFCERTERR
|
||||||
} uerr_t;
|
} uerr_t;
|
||||||
|
@ -206,7 +206,7 @@
|
|||||||
|
|
||||||
2009-04-11 Steven Schubiger <stsc@member.fsf.org>
|
2009-04-11 Steven Schubiger <stsc@member.fsf.org>
|
||||||
|
|
||||||
* run-px: Skip testing with real rc files by setting
|
* run-px: Skip testing with real rc files by setting
|
||||||
SYSTEM_WGETRC and WGETRC to /dev/null.
|
SYSTEM_WGETRC and WGETRC to /dev/null.
|
||||||
|
|
||||||
2009-02-25 Benjamin Wolsey <bwy@benjaminwolsey.de>
|
2009-02-25 Benjamin Wolsey <bwy@benjaminwolsey.de>
|
||||||
@ -230,8 +230,8 @@
|
|||||||
* Test-auth-basic.px, Test-auth-no-challenge.px,
|
* Test-auth-basic.px, Test-auth-no-challenge.px,
|
||||||
Test-auth-no-challenge-url.px, Test-c-full.px,
|
Test-auth-no-challenge-url.px, Test-c-full.px,
|
||||||
Test-c-partial.px, Test-c.px, Test-c-shorter.px,
|
Test-c-partial.px, Test-c.px, Test-c-shorter.px,
|
||||||
Test-E-k-K.px, Test-E-k.px, Test-ftp.px,
|
Test-E-k-K.px, Test-E-k.px, Test-ftp.px,
|
||||||
Test-HTTP-Content-Disposition-1.px,
|
Test-HTTP-Content-Disposition-1.px,
|
||||||
Test-HTTP-Content-Disposition-2.px,
|
Test-HTTP-Content-Disposition-2.px,
|
||||||
Test-HTTP-Content-Disposition.px, Test-N-current.px,
|
Test-HTTP-Content-Disposition.px, Test-N-current.px,
|
||||||
Test-N-HTTP-Content-Disposition.px,
|
Test-N-HTTP-Content-Disposition.px,
|
||||||
@ -240,9 +240,9 @@
|
|||||||
Test-N-no-info.px, Test--no-content-disposition.px,
|
Test-N-no-info.px, Test--no-content-disposition.px,
|
||||||
Test--no-content-disposition-trivial.px, Test-N-old.px,
|
Test--no-content-disposition-trivial.px, Test-N-old.px,
|
||||||
Test-nonexisting-quiet.px, Test-noop.px, Test-np.px,
|
Test-nonexisting-quiet.px, Test-noop.px, Test-np.px,
|
||||||
Test-N.px, Test-N-smaller.px,
|
Test-N.px, Test-N-smaller.px,
|
||||||
Test-O-HTTP-Content-Disposition.px, Test-O-nc.px,
|
Test-O-HTTP-Content-Disposition.px, Test-O-nc.px,
|
||||||
Test-O--no-content-disposition.px,
|
Test-O--no-content-disposition.px,
|
||||||
Test-O--no-content-disposition-trivial.px,
|
Test-O--no-content-disposition-trivial.px,
|
||||||
Test-O-nonexisting.px, Test-O.px,
|
Test-O-nonexisting.px, Test-O.px,
|
||||||
Test-proxy-auth-basic.px, Test-Restrict-Lowercase.px,
|
Test-proxy-auth-basic.px, Test-Restrict-Lowercase.px,
|
||||||
@ -646,7 +646,7 @@
|
|||||||
|
|
||||||
2006-05-26 Mauro Tortonesi <mauro@ferrara.linux.it>
|
2006-05-26 Mauro Tortonesi <mauro@ferrara.linux.it>
|
||||||
|
|
||||||
* HTTPServer.pm: Fixed bug when returning 404. Improved logging.
|
* HTTPServer.pm: Fixed bug when returning 404. Improved logging.
|
||||||
|
|
||||||
* Test.pm: Added support for command lines which use an absolute path
|
* Test.pm: Added support for command lines which use an absolute path
|
||||||
for the Wget binary.
|
for the Wget binary.
|
||||||
@ -671,7 +671,7 @@
|
|||||||
|
|
||||||
* HTTPTest.pm: Updated to new test format.
|
* HTTPTest.pm: Updated to new test format.
|
||||||
|
|
||||||
* Test.pm: Improved test setup, verification and cleanup. Major
|
* Test.pm: Improved test setup, verification and cleanup. Major
|
||||||
refactoring.
|
refactoring.
|
||||||
|
|
||||||
* Test1.px: Updated to new test format.
|
* Test1.px: Updated to new test format.
|
||||||
@ -685,17 +685,17 @@
|
|||||||
|
|
||||||
2005-12-05 Mauro Tortonesi <mauro@ferrara.linux.it>
|
2005-12-05 Mauro Tortonesi <mauro@ferrara.linux.it>
|
||||||
|
|
||||||
* HTTPServer.pm: Refactored as a subclass of HTTP::Daemon.
|
* HTTPServer.pm: Refactored as a subclass of HTTP::Daemon.
|
||||||
Removed the old run method and renamed the old run_daemon
|
Removed the old run method and renamed the old run_daemon
|
||||||
method to run. Added support for partial
|
method to run. Added support for partial
|
||||||
|
|
||||||
* Testing.pm: Renamed to HTTPTest.pm.
|
* Testing.pm: Renamed to HTTPTest.pm.
|
||||||
|
|
||||||
* HTTPTest.pm: Refactored as a subclass of Test. Renamed
|
* HTTPTest.pm: Refactored as a subclass of Test. Renamed
|
||||||
Run_HTTP_Test to run, verify_download to _verify_download
|
Run_HTTP_Test to run, verify_download to _verify_download
|
||||||
and added support for timestamp checking.
|
and added support for timestamp checking.
|
||||||
|
|
||||||
* Test.pm: Added Test class as the super class of every
|
* Test.pm: Added Test class as the super class of every
|
||||||
testcase.
|
testcase.
|
||||||
|
|
||||||
* test1: Renamed to Test1.px.
|
* test1: Renamed to Test1.px.
|
||||||
|
@ -457,7 +457,7 @@ sub __open_data_connection
|
|||||||
$_attr_data{$attr};
|
$_attr_data{$attr};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _standard_keys
|
sub _standard_keys
|
||||||
{
|
{
|
||||||
keys %_attr_data;
|
keys %_attr_data;
|
||||||
}
|
}
|
||||||
@ -562,10 +562,10 @@ sub run
|
|||||||
|
|
||||||
print STDERR "in child\n" if $log;
|
print STDERR "in child\n" if $log;
|
||||||
|
|
||||||
my $conn = {
|
my $conn = {
|
||||||
'paths' => FTPPaths->new($self->{'_input'},
|
'paths' => FTPPaths->new($self->{'_input'},
|
||||||
$self->{'_server_behavior'}),
|
$self->{'_server_behavior'}),
|
||||||
'socket' => $socket,
|
'socket' => $socket,
|
||||||
'state' => $_connection_states{NEWCONN},
|
'state' => $_connection_states{NEWCONN},
|
||||||
'dir' => '/',
|
'dir' => '/',
|
||||||
'restart' => 0,
|
'restart' => 0,
|
||||||
@ -778,7 +778,7 @@ sub get_list {
|
|||||||
my $info = $self->get_info($path);
|
my $info = $self->get_info($path);
|
||||||
return undef unless defined $info;
|
return undef unless defined $info;
|
||||||
my $list = [];
|
my $list = [];
|
||||||
|
|
||||||
if ($info->{'_type'} eq 'd') {
|
if ($info->{'_type'} eq 'd') {
|
||||||
for my $item (keys %$info) {
|
for my $item (keys %$info) {
|
||||||
next if $item =~ /^_/;
|
next if $item =~ /^_/;
|
||||||
|
@ -21,7 +21,7 @@ my $VERSION = 0.01;
|
|||||||
return $self->SUPER::_default_for($attr);
|
return $self->SUPER::_default_for($attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _standard_keys
|
sub _standard_keys
|
||||||
{
|
{
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
($self->SUPER::_standard_keys(), keys %_attr_data);
|
($self->SUPER::_standard_keys(), keys %_attr_data);
|
||||||
|
@ -46,9 +46,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test--no-content-disposition-trivial",
|
my $the_test = HTTPTest->new (name => "Test--no-content-disposition-trivial",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test--no-content-disposition",
|
my $the_test = HTTPTest->new (name => "Test--no-content-disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -43,9 +43,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test--spider-fail",
|
my $the_test = HTTPTest->new (name => "Test--spider-fail",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -100,9 +100,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition-trivial",
|
my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition-trivial",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -101,9 +101,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition",
|
my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -101,9 +101,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test--spider-r-HTTP-Content-Disposition",
|
my $the_test = HTTPTest->new (name => "Test--spider-r-HTTP-Content-Disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -100,9 +100,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test--spider-r",
|
my $the_test = HTTPTest->new (name => "Test--spider-r",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -43,9 +43,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test--spider",
|
my $the_test = HTTPTest->new (name => "Test--spider",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -80,9 +80,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-E-k-K",
|
my $the_test = HTTPTest->new (name => "Test-E-k-K",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -77,9 +77,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-E-k",
|
my $the_test = HTTPTest->new (name => "Test-E-k",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -66,9 +66,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-1",
|
my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-1",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -66,9 +66,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-2",
|
my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-2",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -47,9 +47,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition",
|
my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -39,9 +39,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition-trivial",
|
my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition-trivial",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition",
|
my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -41,9 +41,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-N-HTTP-Content-Disposition",
|
my $the_test = HTTPTest->new (name => "Test-N-HTTP-Content-Disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -55,9 +55,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-N-current",
|
my $the_test = HTTPTest->new (name => "Test-N-current",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -53,9 +53,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-N-current",
|
my $the_test = HTTPTest->new (name => "Test-N-current",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -53,9 +53,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-N-old",
|
my $the_test = HTTPTest->new (name => "Test-N-old",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -56,9 +56,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-N-current",
|
my $the_test = HTTPTest->new (name => "Test-N-current",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -39,9 +39,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-N",
|
my $the_test = HTTPTest->new (name => "Test-N",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition-trivial",
|
my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition-trivial",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition",
|
my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-O-HTTP-Content-Disposition",
|
my $the_test = HTTPTest->new (name => "Test-O-HTTP-Content-Disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-O-nc",
|
my $the_test = HTTPTest->new (name => "Test-O-nc",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-O-nonexisting",
|
my $the_test = HTTPTest->new (name => "Test-O-nonexisting",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-O",
|
my $the_test = HTTPTest->new (name => "Test-O",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-Restrict-Lowercase",
|
my $the_test = HTTPTest->new (name => "Test-Restrict-Lowercase",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-Restrict-Uppercase",
|
my $the_test = HTTPTest->new (name => "Test-Restrict-Uppercase",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -39,9 +39,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-auth-basic",
|
my $the_test = HTTPTest->new (name => "Test-auth-basic",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-auth-no-challenge-url",
|
my $the_test = HTTPTest->new (name => "Test-auth-no-challenge-url",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -41,9 +41,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-auth-no-challenge",
|
my $the_test = HTTPTest->new (name => "Test-auth-no-challenge",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-auth-with-content-disposition",
|
my $the_test = HTTPTest->new (name => "Test-auth-with-content-disposition",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-c-full",
|
my $the_test = HTTPTest->new (name => "Test-c-full",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -57,9 +57,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-c-partial",
|
my $the_test = HTTPTest->new (name => "Test-c-partial",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -54,9 +54,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-c-partial",
|
my $the_test = HTTPTest->new (name => "Test-c-partial",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -44,9 +44,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-c",
|
my $the_test = HTTPTest->new (name => "Test-c",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
existing => \%existing_files,
|
existing => \%existing_files,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
@ -43,9 +43,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-cookies-401",
|
my $the_test = HTTPTest->new (name => "Test-cookies-401",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -49,9 +49,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-cookies",
|
my $the_test = HTTPTest->new (name => "Test-cookies",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ my %preexisting_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = FTPTest->new (name => "Test-ftp-bad-list",
|
my $the_test = FTPTest->new (name => "Test-ftp-bad-list",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files,
|
output => \%expected_downloaded_files,
|
||||||
existing => \%preexisting_files,
|
existing => \%preexisting_files,
|
||||||
server_behavior => {bad_list => 1});
|
server_behavior => {bad_list => 1});
|
||||||
|
@ -42,9 +42,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = FTPTest->new (name => "Test-ftp-iri",
|
my $the_test = FTPTest->new (name => "Test-ftp-iri",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = FTPTest->new (name => "Test-ftp-iri",
|
my $the_test = FTPTest->new (name => "Test-ftp-iri",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = FTPTest->new (name => "Test-ftp-iri-recursive",
|
my $the_test = FTPTest->new (name => "Test-ftp-iri-recursive",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -39,9 +39,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = FTPTest->new (name => "Test-ftp-iri",
|
my $the_test = FTPTest->new (name => "Test-ftp-iri",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ my %expected_downloaded_files = (
|
|||||||
|
|
||||||
my $the_test = FTPTest->new (name => "Test-ftp-pasv-fail",
|
my $the_test = FTPTest->new (name => "Test-ftp-pasv-fail",
|
||||||
server_behavior => {fail_on_pasv => 1},
|
server_behavior => {fail_on_pasv => 1},
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = FTPTest->new (name => "Test-ftp-recursive",
|
my $the_test = FTPTest->new (name => "Test-ftp-recursive",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -35,9 +35,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = FTPTest->new (name => "Test-ftp",
|
my $the_test = FTPTest->new (name => "Test-ftp",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -42,9 +42,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-idn-cmd",
|
my $the_test = HTTPTest->new (name => "Test-idn-cmd",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-idn-headers",
|
my $the_test = HTTPTest->new (name => "Test-idn-headers",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -58,9 +58,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-idn-meta",
|
my $the_test = HTTPTest->new (name => "Test-idn-meta",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -69,9 +69,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-idn-robots",
|
my $the_test = HTTPTest->new (name => "Test-idn-robots",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -187,9 +187,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-iri-disabled",
|
my $the_test = HTTPTest->new (name => "Test-iri-disabled",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -199,9 +199,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-iri-forced-remote",
|
my $the_test = HTTPTest->new (name => "Test-iri-forced-remote",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -165,9 +165,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-iri-list",
|
my $the_test = HTTPTest->new (name => "Test-iri-list",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -105,9 +105,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-meta-robots",
|
my $the_test = HTTPTest->new (name => "Test-meta-robots",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
@ -34,9 +34,9 @@ my %expected_downloaded_files = (
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
my $the_test = HTTPTest->new (name => "Test-nonexisting-quiet",
|
my $the_test = HTTPTest->new (name => "Test-nonexisting-quiet",
|
||||||
input => \%urls,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
output => \%expected_downloaded_files);
|
output => \%expected_downloaded_files);
|
||||||
exit $the_test->run();
|
exit $the_test->run();
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user