From 48ce66e73dd273857d99864917e952dafacfccc7 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Wed, 13 Jan 2016 17:11:58 +0100 Subject: [PATCH] Fix MatrixHTTPAPI's _send() for empty requests It now correctly sends an empty JSON object. --- src/matrix-http-api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix-http-api.c b/src/matrix-http-api.c index 23740fd..71a86cb 100644 --- a/src/matrix-http-api.c +++ b/src/matrix-http-api.c @@ -698,8 +698,8 @@ _send(MatrixHTTPAPI *api, json_generator_set_root(generator, (JsonNode *)content); data = json_generator_to_data(generator, &datalen); } else { - data = g_strdup(""); - datalen = 0; + data = g_strdup("{}"); + datalen = 2; } g_debug("Sending (%s %s): %s", method, url, data);