[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Patch: Avoid unnecessary UTF-8 encoded fallback
From: |
Tim Rühsen |
Subject: |
Re: [Bug-wget] Patch: Avoid unnecessary UTF-8 encoded fallback |
Date: |
Wed, 25 Oct 2017 14:46:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
Thanks, applied.
With Best Regards, Tim
On 10/25/2017 12:56 PM, YX Hao wrote:
> Dear there,
>
> Things are clear as the patch shows. ☺
>
> ==================================================
> diff --git a/src/retr.c b/src/retr.c
> index a27d58af..c1bc600e 100644
> --- a/src/retr.c
> +++ b/src/retr.c
> @@ -1098,11 +1098,16 @@ retrieve_url (struct url * orig_parsed, const char
> *origurl, char **file,
> u = url_parse (origurl, NULL, iri, true);
> if (u)
> {
> - DEBUGP (("[IRI fallbacking to non-utf8 for %s\n", quote (url)));
> - xfree (url);
> - url = xstrdup (u->url);
> - iri_fallbacked = 1;
> - goto redirected;
> + if (strcmp(u->url, orig_parsed->url))
> + {
> + DEBUGP (("[IRI fallbacking to non-utf8 for %s\n", quote
> (url)));
> + xfree (url);
> + url = xstrdup (u->url);
> + iri_fallbacked = 1;
> + goto redirected;
> + }
> + else
> + DEBUGP (("[Needn't fallback to non-utf8 for %s\n", quote
> (url)));
> }
> else
> DEBUGP (("[Couldn't fallback to non-utf8 for %s\n", quote (url)));
>
>
> Regards,
> YX Hao
>
signature.asc
Description: OpenPGP digital signature