[libsoup] soup-message-client-io: ASCIIfy unicode hostnames for Host header
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] soup-message-client-io: ASCIIfy unicode hostnames for Host header
- Date: Tue, 15 Feb 2011 20:15:32 +0000 (UTC)
commit ea0886fd7f2b5ea198d7a6cbae9e9a9f98fdbc07
Author: Dan Winship <danw gnome org>
Date: Tue Feb 15 15:13:32 2011 -0500
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
libsoup/soup-message-client-io.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]