+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.
for (++buf, --bufsize;
bufsize && *buf != s->quote_char && *buf != '\n';
++buf, --bufsize)
- if (*buf == '#')
+ if (ph && *buf == '#')
ph = buf;
if (!bufsize)
{
{
p = buf;
for (; bufsize && !ISSPACE (*buf) && *buf != '>'; ++buf, --bufsize)
- if (*buf == '#')
+ if (ph && *buf == '#')
ph = buf;
if (!bufsize)
break;
char **result = (char **)arg;
char *p;
- *result = xstrdup (hdr);
p = strrchr (hdr, ';');
if (p)
{
remhost = ou->host;
remport = ou->port;
- if (remport == 80) {
- host_port = NULL; host_port_len = 0;
- }
- else {
+ if (remport == 80)
+ {
+ host_port = NULL;
+ host_port_len = 0;
+ }
+ else
+ {
host_port = (char *)alloca (numdigit (remport) + 2);
host_port_len = sprintf (host_port, ":%d", remport);
- }
+ }
/* Allocate the memory for the request. */
request = (char *)alloca (strlen (command) + strlen (path)