From: Dan Winship Date: Tue, 15 Feb 2011 20:13:32 +0000 (-0500) Subject: soup-message-client-io: ASCIIfy unicode hostnames for Host header X-Git-Tag: LIBSOUP_2_33_90~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea0886fd7f2b5ea198d7a6cbae9e9a9f98fdbc07;p=platform%2Fupstream%2Flibsoup.git soup-message-client-io: ASCIIfy unicode hostnames for Host header We were resolving unicode hostnames correctly, but then putting them in the Host header as UTF-8 rather than using the ASCII-encoded version. Fix that. https://bugzilla.gnome.org/show_bug.cgi?id=642075 --- diff --git a/libsoup/soup-message-client-io.c b/libsoup/soup-message-client-io.c index 745d921..8796e90 100644 --- a/libsoup/soup-message-client-io.c +++ b/libsoup/soup-message-client-io.c @@ -76,6 +76,8 @@ get_request_headers (SoupMessage *req, GString *header, if (strchr (uri->host, ':')) uri_host = g_strdup_printf ("[%s]", uri->host); + else if (g_hostname_is_non_ascii (uri->host)) + uri_host = g_hostname_to_ascii (uri->host); else uri_host = uri->host;