mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] More old fixes.
This commit is contained in:
parent
aeabb42714
commit
bc7060a81d
@ -1,3 +1,12 @@
|
|||||||
|
1998-10-17 Hrvoje Niksic <hniksic@srce.hr>
|
||||||
|
|
||||||
|
* http.c (http_process_type): Removed needless strdup(), a memory
|
||||||
|
leak.
|
||||||
|
|
||||||
|
1998-09-25 Hrvoje Niksic <hniksic@srce.hr>
|
||||||
|
|
||||||
|
* html.c (htmlfindurl): Set PH to the first occurrence of `#'.
|
||||||
|
|
||||||
1998-09-25 Simon Munton <simonm@m4data.co.uk>
|
1998-09-25 Simon Munton <simonm@m4data.co.uk>
|
||||||
|
|
||||||
* init.c (wgetrc_file_name): Don't free HOME under Windows.
|
* init.c (wgetrc_file_name): Don't free HOME under Windows.
|
||||||
|
@ -264,7 +264,7 @@ htmlfindurl (const char *buf, int bufsize, int *size, int init)
|
|||||||
for (++buf, --bufsize;
|
for (++buf, --bufsize;
|
||||||
bufsize && *buf != s->quote_char && *buf != '\n';
|
bufsize && *buf != s->quote_char && *buf != '\n';
|
||||||
++buf, --bufsize)
|
++buf, --bufsize)
|
||||||
if (*buf == '#')
|
if (ph && *buf == '#')
|
||||||
ph = buf;
|
ph = buf;
|
||||||
if (!bufsize)
|
if (!bufsize)
|
||||||
{
|
{
|
||||||
@ -287,7 +287,7 @@ htmlfindurl (const char *buf, int bufsize, int *size, int init)
|
|||||||
{
|
{
|
||||||
p = buf;
|
p = buf;
|
||||||
for (; bufsize && !ISSPACE (*buf) && *buf != '>'; ++buf, --bufsize)
|
for (; bufsize && !ISSPACE (*buf) && *buf != '>'; ++buf, --bufsize)
|
||||||
if (*buf == '#')
|
if (ph && *buf == '#')
|
||||||
ph = buf;
|
ph = buf;
|
||||||
if (!bufsize)
|
if (!bufsize)
|
||||||
break;
|
break;
|
||||||
|
14
src/http.c
14
src/http.c
@ -241,7 +241,6 @@ http_process_type (const char *hdr, void *arg)
|
|||||||
char **result = (char **)arg;
|
char **result = (char **)arg;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
*result = xstrdup (hdr);
|
|
||||||
p = strrchr (hdr, ';');
|
p = strrchr (hdr, ';');
|
||||||
if (p)
|
if (p)
|
||||||
{
|
{
|
||||||
@ -458,13 +457,16 @@ gethttp (struct urlinfo *u, struct http_stat *hs, int *dt)
|
|||||||
remhost = ou->host;
|
remhost = ou->host;
|
||||||
remport = ou->port;
|
remport = ou->port;
|
||||||
|
|
||||||
if (remport == 80) {
|
if (remport == 80)
|
||||||
host_port = NULL; host_port_len = 0;
|
{
|
||||||
}
|
host_port = NULL;
|
||||||
else {
|
host_port_len = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
host_port = (char *)alloca (numdigit (remport) + 2);
|
host_port = (char *)alloca (numdigit (remport) + 2);
|
||||||
host_port_len = sprintf (host_port, ":%d", remport);
|
host_port_len = sprintf (host_port, ":%d", remport);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate the memory for the request. */
|
/* Allocate the memory for the request. */
|
||||||
request = (char *)alloca (strlen (command) + strlen (path)
|
request = (char *)alloca (strlen (command) + strlen (path)
|
||||||
|
Loading…
Reference in New Issue
Block a user