mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Commit several fixes.
This commit is contained in:
parent
e5b8bc39c0
commit
6b4a85888e
@ -1,3 +1,9 @@
|
|||||||
|
2000-04-12 Hrvoje Niksic <hniksic@iskon.hr>
|
||||||
|
|
||||||
|
* http.c (gethttp): Don't free REQUEST -- it was allocated with
|
||||||
|
alloca().
|
||||||
|
Pointed out by Gisle Vanem <gvanem@eunet.no>.
|
||||||
|
|
||||||
2000-04-04 Dan Harkless <dan-wget@dilvish.speed.net>
|
2000-04-04 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||||
|
|
||||||
* host.c (store_hostaddress): R. K. Owen's patch introduces a
|
* host.c (store_hostaddress): R. K. Owen's patch introduces a
|
||||||
|
@ -67,8 +67,8 @@ strcasecmp (const char *s1, const char *s2)
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
c1 = tolower (*p1++);
|
c1 = TOLOWER (*p1++);
|
||||||
c2 = tolower (*p2++);
|
c2 = TOLOWER (*p2++);
|
||||||
if (c1 == '\0')
|
if (c1 == '\0')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -96,8 +96,8 @@ strncasecmp (const char *s1, const char *s2, size_t n)
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
c1 = tolower (*p1++);
|
c1 = TOLOWER (*p1++);
|
||||||
c2 = tolower (*p2++);
|
c2 = TOLOWER (*p2++);
|
||||||
if (c1 == '\0' || c1 != c2)
|
if (c1 == '\0' || c1 != c2)
|
||||||
return c1 - c2;
|
return c1 - c2;
|
||||||
} while (--n > 0);
|
} while (--n > 0);
|
||||||
|
@ -90,7 +90,7 @@ ftp_expected_bytes (const char *s)
|
|||||||
++s;
|
++s;
|
||||||
if (!*s)
|
if (!*s)
|
||||||
return 0;
|
return 0;
|
||||||
if (tolower (*s) != 'b')
|
if (TOLOWER (*s) != 'b')
|
||||||
continue;
|
continue;
|
||||||
if (strncasecmp (s, "byte", 4))
|
if (strncasecmp (s, "byte", 4))
|
||||||
continue;
|
continue;
|
||||||
@ -243,8 +243,8 @@ Error in server response, closing control connection.\n"));
|
|||||||
}
|
}
|
||||||
/* Third: Set type to Image (binary). */
|
/* Third: Set type to Image (binary). */
|
||||||
if (!opt.server_response)
|
if (!opt.server_response)
|
||||||
logprintf (LOG_VERBOSE, "==> TYPE %c ... ", toupper (u->ftp_type));
|
logprintf (LOG_VERBOSE, "==> TYPE %c ... ", TOUPPER (u->ftp_type));
|
||||||
err = ftp_type (&con->rbuf, toupper (u->ftp_type));
|
err = ftp_type (&con->rbuf, TOUPPER (u->ftp_type));
|
||||||
/* FTPRERR, WRITEFAILED, FTPUNKNOWNTYPE */
|
/* FTPRERR, WRITEFAILED, FTPUNKNOWNTYPE */
|
||||||
switch (err)
|
switch (err)
|
||||||
{
|
{
|
||||||
@ -268,7 +268,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
logputs (LOG_VERBOSE, "\n");
|
logputs (LOG_VERBOSE, "\n");
|
||||||
logprintf (LOG_NOTQUIET,
|
logprintf (LOG_NOTQUIET,
|
||||||
_("Unknown type `%c', closing control connection.\n"),
|
_("Unknown type `%c', closing control connection.\n"),
|
||||||
toupper (u->ftp_type));
|
TOUPPER (u->ftp_type));
|
||||||
CLOSE (csock);
|
CLOSE (csock);
|
||||||
rbuf_uninitialize (&con->rbuf);
|
rbuf_uninitialize (&con->rbuf);
|
||||||
return err;
|
return err;
|
||||||
|
@ -128,7 +128,7 @@ header_process (const char *header, const char *name,
|
|||||||
void *arg)
|
void *arg)
|
||||||
{
|
{
|
||||||
/* Check whether HEADER matches NAME. */
|
/* Check whether HEADER matches NAME. */
|
||||||
while (*name && (tolower (*name) == tolower (*header)))
|
while (*name && (TOLOWER (*name) == TOLOWER (*header)))
|
||||||
++name, ++header;
|
++name, ++header;
|
||||||
if (*name || *header++ != ':')
|
if (*name || *header++ != ':')
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -505,7 +505,6 @@ Accept: %s\r\n\
|
|||||||
if (num_written < 0)
|
if (num_written < 0)
|
||||||
{
|
{
|
||||||
logputs (LOG_VERBOSE, _("Failed writing HTTP request.\n"));
|
logputs (LOG_VERBOSE, _("Failed writing HTTP request.\n"));
|
||||||
free (request);
|
|
||||||
CLOSE (sock);
|
CLOSE (sock);
|
||||||
return WRITEFAILED;
|
return WRITEFAILED;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,11 @@ i18n_initialize (void)
|
|||||||
things up. For example, when in a foreign locale, Solaris
|
things up. For example, when in a foreign locale, Solaris
|
||||||
strptime() fails to handle international dates correctly, which
|
strptime() fails to handle international dates correctly, which
|
||||||
makes http_atotm() malfunction. */
|
makes http_atotm() malfunction. */
|
||||||
|
#ifdef LC_MESSAGES
|
||||||
setlocale (LC_MESSAGES, "");
|
setlocale (LC_MESSAGES, "");
|
||||||
|
#else
|
||||||
|
setlocale (LC_ALL, "");
|
||||||
|
#endif
|
||||||
/* Set the text message domain. */
|
/* Set the text message domain. */
|
||||||
bindtextdomain ("wget", LOCALEDIR);
|
bindtextdomain ("wget", LOCALEDIR);
|
||||||
textdomain ("wget");
|
textdomain ("wget");
|
||||||
|
@ -335,7 +335,7 @@ recursive_retrieve (const char *file, const char *this_url)
|
|||||||
char *p;
|
char *p;
|
||||||
/* Just lowercase the hostname. */
|
/* Just lowercase the hostname. */
|
||||||
for (p = u->host; *p; p++)
|
for (p = u->host; *p; p++)
|
||||||
*p = tolower (*p);
|
*p = TOLOWER (*p);
|
||||||
free (u->url);
|
free (u->url);
|
||||||
u->url = str_url (u, 0);
|
u->url = str_url (u, 0);
|
||||||
}
|
}
|
||||||
@ -655,9 +655,9 @@ parse_robots (const char *robots_filename)
|
|||||||
sprintf (version, "Wget/%s", version_string);
|
sprintf (version, "Wget/%s", version_string);
|
||||||
}
|
}
|
||||||
for (p = version; *p; p++)
|
for (p = version; *p; p++)
|
||||||
*p = tolower (*p);
|
*p = TOLOWER (*p);
|
||||||
for (p = base_version; *p && *p != '/'; p++)
|
for (p = base_version; *p && *p != '/'; p++)
|
||||||
*p = tolower (*p);
|
*p = TOLOWER (*p);
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
/* Setting this to 1 means that Wget considers itself under
|
/* Setting this to 1 means that Wget considers itself under
|
||||||
@ -729,7 +729,7 @@ parse_robots (const char *robots_filename)
|
|||||||
int match = 0;
|
int match = 0;
|
||||||
/* Lowercase the agent string. */
|
/* Lowercase the agent string. */
|
||||||
for (p = str; *p; p++)
|
for (p = str; *p; p++)
|
||||||
*p = tolower (*p);
|
*p = TOLOWER (*p);
|
||||||
/* If the string is `*', it matches. */
|
/* If the string is `*', it matches. */
|
||||||
if (*str == '*' && !*(str + 1))
|
if (*str == '*' && !*(str + 1))
|
||||||
match = 1;
|
match = 1;
|
||||||
|
@ -113,7 +113,7 @@ char *xstrdup PARAMS ((const char *));
|
|||||||
|
|
||||||
/* ASCII char -> HEX digit */
|
/* ASCII char -> HEX digit */
|
||||||
#define ASC2HEXD(x) (((x) >= '0' && (x) <= '9') ? \
|
#define ASC2HEXD(x) (((x) >= '0' && (x) <= '9') ? \
|
||||||
((x) - '0') : (toupper(x) - 'A' + 10))
|
((x) - '0') : (TOUPPER(x) - 'A' + 10))
|
||||||
|
|
||||||
/* HEX digit -> ASCII char */
|
/* HEX digit -> ASCII char */
|
||||||
#define HEXD2ASC(x) (((x) < 10) ? ((x) + '0') : ((x) - 10 + 'A'))
|
#define HEXD2ASC(x) (((x) < 10) ? ((x) + '0') : ((x) - 10 + 'A'))
|
||||||
|
Loading…
Reference in New Issue
Block a user