]> sjero.net Git - wget/commitdiff
[svn] Decode %HH sequences in host name.
authorhniksic <devnull@localhost>
Fri, 19 Mar 2004 21:00:09 +0000 (13:00 -0800)
committerhniksic <devnull@localhost>
Fri, 19 Mar 2004 21:00:09 +0000 (13:00 -0800)
src/ChangeLog
src/url.c

index 4c9c9cf083a1c6837341261556d5ab50765edd6f..e62b42c241d044342536405e8f1e53365281206d 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-19  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * url.c (url_parse): Decode %HH sequences in host name.
+
 2004-03-04  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * convert.c (local_quote_string): Quote "#" as "%23" and "%" as
index 3bc357e48e71483ba468bfe1e5fae349064221a6..180a3bc06dc168cac3064e29a9b743378bd9b7e6 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -999,6 +999,15 @@ url_parse (const char *url, int *error)
 
   host_modified = lowercase_str (u->host);
 
+  /* Decode %HH sequences in host name.  This is important not so much
+     to support %HH sequences, but to support binary characters (which
+     will have been converted to %HH by reencode_escapes).  */
+  if (strchr (u->host, '%'))
+    {
+      url_unescape (u->host);
+      host_modified = 1;
+    }
+
   if (params_b)
     u->params = strdupdelim (params_b, params_e);
   if (query_b)