diff options
-rw-r--r-- | matrix-api.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/matrix-api.c b/matrix-api.c index 0884c93..9edea18 100644 --- a/matrix-api.c +++ b/matrix-api.c @@ -238,6 +238,11 @@ static int _handle_message_complete(http_parser *http_parser) MatrixApiResponseParserData *response_data = http_parser->data; GError *err = NULL; + if (!response_data->content_type) { + purple_debug_info("matrixprpl", "Missing content type\n"); + return 1; + } + if(strcmp(response_data->content_type, "application/json") == 0) { if(!json_parser_load_from_data(response_data -> json_parser, response_data->body, |