mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
quote*() functions don't like that much NULL arg
This commit is contained in:
parent
b967d49f79
commit
bfd8a73f00
@ -318,6 +318,7 @@ iri_new (void)
|
||||
i->uri_encoding = opt.encoding_remote ? xstrdup (opt.encoding_remote) : NULL;
|
||||
i->content_encoding = NULL;
|
||||
i->utf8_encode = opt.enable_iri;
|
||||
return i;
|
||||
}
|
||||
|
||||
void
|
||||
@ -331,12 +332,12 @@ iri_free (struct iri *i)
|
||||
void
|
||||
set_uri_encoding (struct iri *i, char *charset, bool force)
|
||||
{
|
||||
DEBUGP (("[IRI uri = `%s'\n", quote (charset)));
|
||||
DEBUGP (("[IRI uri = `%s'\n", charset ? quote (charset) : "None"));
|
||||
if (!force && opt.encoding_remote)
|
||||
return;
|
||||
if (i->uri_encoding)
|
||||
{
|
||||
if (!strcasecmp (i->uri_encoding, charset))
|
||||
if (charset && !strcasecmp (i->uri_encoding, charset))
|
||||
return;
|
||||
xfree (i->uri_encoding);
|
||||
}
|
||||
@ -347,12 +348,12 @@ set_uri_encoding (struct iri *i, char *charset, bool force)
|
||||
void
|
||||
set_content_encoding (struct iri *i, char *charset)
|
||||
{
|
||||
DEBUGP (("[IRI content = %s\n", quote (charset)));
|
||||
DEBUGP (("[IRI content = %s\n", charset ? quote (charset) : "None"));
|
||||
if (opt.encoding_remote)
|
||||
return;
|
||||
if (i->content_encoding)
|
||||
{
|
||||
if (!strcasecmp (i->content_encoding, charset))
|
||||
if (charset && !strcasecmp (i->content_encoding, charset))
|
||||
return;
|
||||
xfree (i->content_encoding);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ url_enqueue (struct url_queue *queue, struct iri *i,
|
||||
|
||||
if (i)
|
||||
DEBUGP (("[IRI Enqueuing %s with %s\n", quote (url),
|
||||
quote (i->uri_encoding)));
|
||||
i->uri_encoding ? quote (i->uri_encoding) : "None"));
|
||||
|
||||
if (queue->tail)
|
||||
queue->tail->next = qel;
|
||||
|
@ -636,7 +636,8 @@ retrieve_url (const char *origurl, char **file, char **newloc,
|
||||
}
|
||||
|
||||
DEBUGP (("[IRI Retrieving %s with %s (UTF-8=%d)\n", quote (url),
|
||||
quote (iri->uri_encoding), iri->utf8_encode));
|
||||
iri->uri_encoding ? quote (iri->uri_encoding) : "None",
|
||||
iri->utf8_encode));
|
||||
|
||||
if (!refurl)
|
||||
refurl = opt.referer;
|
||||
|
Loading…
Reference in New Issue
Block a user