X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1d0ed63faef8861a5a1026813aa8907828671e40..cbffd053d895b0f64a8bfefc4fe838431d3387d5:/sbr/oauth.c diff --git a/sbr/oauth.c b/sbr/oauth.c index 0d6d76d4..83639596 100644 --- a/sbr/oauth.c +++ b/sbr/oauth.c @@ -265,7 +265,7 @@ set_err_http(mh_oauth_ctx *ctx, const struct curl_ctx *curl_ctx) /* 5.2. Error Response says error response should use status code 400 and * application/json body. If Content-Type matches, try to parse the body * regardless of the status code. */ - if (curl_ctx->res_body != NULL + if (curl_ctx->res_len > 0 && is_json(curl_ctx->content_type) && get_json_strings(curl_ctx->res_body, curl_ctx->res_len, ctx->log, "error", &error, (void *)NULL)