diff --git a/src/plugins/relay/relay-http.c b/src/plugins/relay/relay-http.c index a498dd188..89dba653e 100644 --- a/src/plugins/relay/relay-http.c +++ b/src/plugins/relay/relay-http.c @@ -1340,7 +1340,7 @@ relay_http_send_error_json (struct t_relay_client *client, if (!error_msg) goto end; - if (weechat_asprintf (&json, "{\"error\": \"%s\"}", error_msg) < 0) + if (weechat_asprintf (&json, "{\"error\":\"%s\"}", error_msg) < 0) goto end; num_bytes = relay_http_send_json (client, return_code, message, headers, diff --git a/tests/unit/plugins/relay/api/test-relay-api-protocol.cpp b/tests/unit/plugins/relay/api/test-relay-api-protocol.cpp index f315724a6..74fe6bada 100644 --- a/tests/unit/plugins/relay/api/test-relay-api-protocol.cpp +++ b/tests/unit/plugins/relay/api/test-relay-api-protocol.cpp @@ -1015,9 +1015,9 @@ TEST(RelayApiProtocolWithClient, RecvHttpMissingPassword) STRCMP_EQUAL("HTTP/1.1 401 Unauthorized\r\n" "Access-Control-Allow-Origin: *\r\n" "Content-Type: application/json; charset=utf-8\r\n" - "Content-Length: 29\r\n" + "Content-Length: 28\r\n" "\r\n" - "{\"error\": \"Missing password\"}", + "{\"error\":\"Missing password\"}", data_sent[0]); } @@ -1035,8 +1035,8 @@ TEST(RelayApiProtocolWithClient, RecvHttpInvalidPassword) STRCMP_EQUAL("HTTP/1.1 401 Unauthorized\r\n" "Access-Control-Allow-Origin: *\r\n" "Content-Type: application/json; charset=utf-8\r\n" - "Content-Length: 29\r\n" + "Content-Length: 28\r\n" "\r\n" - "{\"error\": \"Invalid password\"}", + "{\"error\":\"Invalid password\"}", data_sent[0]); }