[gnome-software] trivial: Enforce UTF-8 json output when sending ODRS reviews



commit 5bd14ab132ce91aec8891e239cd484cbd758570c
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 8406f1f..8cef273 100644
--- a/src/plugins/gs-plugin-odrs.c
+++ b/src/plugins/gs-plugin-odrs.c
@@ -287,7 +287,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 */
@@ -535,7 +535,7 @@ gs_plugin_odrs_fetch_for_app (GsPlugin *plugin, GsApp *app, GError **error)
                return NULL;
        uri = g_strdup_printf ("%s/fetch", 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 (gs_plugin_get_soup_session (plugin), msg);
        if (status_code != SOUP_STATUS_OK) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]