From dd9a354756798059867b5a94da8c68c855c24966 Mon Sep 17 00:00:00 2001 From: hniksic Date: Fri, 19 Mar 2004 13:00:09 -0800 Subject: [PATCH] [svn] Decode %HH sequences in host name. --- src/ChangeLog | 4 ++++ src/url.c | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 4c9c9cf0..e62b42c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-03-19 Hrvoje Niksic + + * url.c (url_parse): Decode %HH sequences in host name. + 2004-03-04 Hrvoje Niksic * convert.c (local_quote_string): Quote "#" as "%23" and "%" as diff --git a/src/url.c b/src/url.c index 3bc357e4..180a3bc0 100644 --- 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) -- 2.39.2