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>
|
||||
|
||||
* 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;
|
||||
bufsize && *buf != s->quote_char && *buf != '\n';
|
||||
++buf, --bufsize)
|
||||
if (*buf == '#')
|
||||
if (ph && *buf == '#')
|
||||
ph = buf;
|
||||
if (!bufsize)
|
||||
{
|
||||
@ -287,7 +287,7 @@ htmlfindurl (const char *buf, int bufsize, int *size, int init)
|
||||
{
|
||||
p = buf;
|
||||
for (; bufsize && !ISSPACE (*buf) && *buf != '>'; ++buf, --bufsize)
|
||||
if (*buf == '#')
|
||||
if (ph && *buf == '#')
|
||||
ph = buf;
|
||||
if (!bufsize)
|
||||
break;
|
||||
|
10
src/http.c
10
src/http.c
@ -241,7 +241,6 @@ http_process_type (const char *hdr, void *arg)
|
||||
char **result = (char **)arg;
|
||||
char *p;
|
||||
|
||||
*result = xstrdup (hdr);
|
||||
p = strrchr (hdr, ';');
|
||||
if (p)
|
||||
{
|
||||
@ -458,10 +457,13 @@ gethttp (struct urlinfo *u, struct http_stat *hs, int *dt)
|
||||
remhost = ou->host;
|
||||
remport = ou->port;
|
||||
|
||||
if (remport == 80) {
|
||||
host_port = NULL; host_port_len = 0;
|
||||
if (remport == 80)
|
||||
{
|
||||
host_port = NULL;
|
||||
host_port_len = 0;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
host_port = (char *)alloca (numdigit (remport) + 2);
|
||||
host_port_len = sprintf (host_port, ":%d", remport);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user