[gnome-software/gnome-3-20] trivial: Enforce UTF-8 json output when sending ODRS reviews
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-20] trivial: Enforce UTF-8 json output when sending ODRS reviews
- Date: Wed, 22 Jun 2016 08:36:13 +0000 (UTC)
commit b27e6edbc066b7953a24eef008918cc09c92fae1
Author: Richard Hughes <richard hughsie com>
Date: Tue Jun 21 22:04:51 2016 +0100
trivial: Enforce UTF-8 json output when sending ODRS reviews
src/plugins/gs-plugin-odrs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-plugin-odrs.c b/src/plugins/gs-plugin-odrs.c
index 28f3d22..2c26549 100644
--- a/src/plugins/gs-plugin-odrs.c
+++ b/src/plugins/gs-plugin-odrs.c
@@ -321,7 +321,7 @@ gs_plugin_odrs_json_post (SoupSession *session,
/* create the GET data */
g_debug ("odrs sending: %s", data);
msg = soup_message_new (SOUP_METHOD_POST, uri);
- soup_message_set_request (msg, "application/json",
+ soup_message_set_request (msg, "application/json; charset=utf-8",
SOUP_MEMORY_COPY, data, strlen (data));
/* set sync request */
@@ -573,7 +573,7 @@ gs_plugin_odrs_fetch_for_app (GsPlugin *plugin, GsApp *app, GError **error)
return NULL;
uri = g_strdup_printf ("%s/fetch", plugin->priv->review_server);
msg = soup_message_new (SOUP_METHOD_POST, uri);
- soup_message_set_request (msg, "application/json",
+ soup_message_set_request (msg, "application/json; charset=utf-8",
SOUP_MEMORY_COPY, data, strlen (data));
status_code = soup_session_send_message (plugin->soup_session, msg);
if (status_code != SOUP_STATUS_OK) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]