From 93c1517c4071c4288ba5a4b038e7634e4c6b5482 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 17 Dec 2015 15:27:43 +0100 Subject: [PATCH] Set URI encoding when redirected * src/retr.c (retrieve_url): Set URI on redirection --- src/retr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/retr.c b/src/retr.c index a6a9bd7a..ddd46cb6 100644 --- a/src/retr.c +++ b/src/retr.c @@ -872,9 +872,11 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file, xfree (mynewloc); mynewloc = construced_newloc; - /* Reset UTF-8 encoding state, keep the URI encoding and reset + /* Reset UTF-8 encoding state, set the URI encoding and reset the content encoding. */ iri->utf8_encode = opt.enable_iri; + if (opt.encoding_remote) + set_uri_encoding (iri, opt.encoding_remote, true); set_content_encoding (iri, NULL); xfree (iri->orig_url);