]> sjero.net Git - wget/blobdiff - src/iri.c
IRI requirement: do not percent-encode already percent-encoded values (try1)
[wget] / src / iri.c
index dce9e2ed0017a2a861a2f70f7474277cf2abfd16..b1e0bf89cd9bc2a9caf55e2e533f1cc2b6a23d12 100644 (file)
--- a/src/iri.c
+++ b/src/iri.c
@@ -39,7 +39,6 @@ as that of the covered work.  */
 #include <errno.h>
 
 #include "utils.h"
-#include "iri.h"
 
 /* RFC3987 section 3.1 mandates STD3 ASCII RULES */
 #define IDNA_FLAGS  IDNA_USE_STD3_ASCII_RULES
@@ -299,6 +298,7 @@ iri_new (void)
   struct iri *i = xmalloc (sizeof (struct iri));
   i->uri_encoding = opt.encoding_remote ? xstrdup (opt.encoding_remote) : NULL;
   i->content_encoding = NULL;
+  i->orig_url = NULL;
   i->utf8_encode = opt.enable_iri;
   return i;
 }
@@ -309,6 +309,7 @@ iri_free (struct iri *i)
 {
   xfree_null (i->uri_encoding);
   xfree_null (i->content_encoding);
+  xfree_null (i->orig_url);
   xfree (i);
 }
 
@@ -317,7 +318,7 @@ iri_free (struct iri *i)
 void
 set_uri_encoding (struct iri *i, char *charset, bool force)
 {
-  DEBUGP (("URI encoding = `%s'\n", charset ? quote (charset) : "None"));
+  DEBUGP (("URI encoding = %s\n", charset ? quote (charset) : "None"));
   if (!force && opt.encoding_remote)
     return;
   if (i->uri_encoding)