From 94c1bc39e17172ae17d59484b126c392d178fa34 Mon Sep 17 00:00:00 2001 From: dowoge Date: Thu, 2 Mar 2023 18:16:33 -0500 Subject: [PATCH] prevent decode from completely failing the rest --- src/modules/http.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/http.lua b/src/modules/http.lua index 8cd3ccd..63efac6 100644 --- a/src/modules/http.lua +++ b/src/modules/http.lua @@ -14,7 +14,7 @@ local STRAFES_NET_RATELIMIMT = { local remaining_timeout = 0 local function request(method,url,headers,body,options) local headers,body=http.request(method,url,headers,body,options) - local rbody=json.decode(body) + local rbody=json.decode(body) or body local rheaders={} for _,t in pairs(headers) do if type(t)=='table' then