X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=a4571ad7019b99180a1b44ffa1ffbd1d055e6d38;hp=113e096a6705f7036fd41c2cc78ea57485f683c7;hb=d3007f1b3a5d033babe40bc4c56a899eb3b10bfa;hpb=6db8909f87012ee8f65e496846962d98cd8bafea diff --git a/src/http.c b/src/http.c index 113e096a..a4571ad7 100644 --- a/src/http.c +++ b/src/http.c @@ -49,6 +49,7 @@ as that of the covered work. */ #include "retr.h" #include "connect.h" #include "netrc.h" +#include "iri.h" #ifdef HAVE_SSL # include "ssl.h" #endif @@ -2045,9 +2046,16 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file)); char *tmp = strchr (type, ';'); if (tmp) { + /* sXXXav: only needed if IRI support is enabled */ + char *tmp2 = tmp + 1; + while (tmp > type && c_isspace (tmp[-1])) --tmp; *tmp = '\0'; + + /* Try to get remote encoding if needed */ + if (opt.enable_iri && !opt.encoding_remote) + /* xxx = */ parse_charset (tmp2); } } hs->newloc = resp_header_strdup (resp, "Location");