From 492f762989f004d9df38ad0d21b96fac2a9dac7a Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Thu, 25 May 2023 17:18:41 +0500 Subject: [PATCH] fixed online courses --- beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua b/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua index 3c9241c..a4d0b95 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua @@ -25,7 +25,7 @@ function UploadCourse() ["Content-Type"] = "text/plain", ["Content-Length"] = filedata:len(), ["User-Agent"] = "Valve/Steam HTTP Client 1.0 (4000)", - ["Accept-Encoding"] = "gzip, deflate", + ["Accept-Encoding"] = "gzip", Authorization = apikey:GetString(), ["Game-Map"] = game.GetMap() } @@ -54,6 +54,8 @@ function GetCourse(sharecode) http.Fetch("http://" .. domain:GetString() .. "/getcourse.php?sharecode=" .. sharecode .. "&map=" .. game.GetMap() .. "&key=" .. apikey:GetString(), function(body, length, headers, code) local errorcode = GetCourse_Errors[body] + print(body) + if not errorcode then print("Success! | Response:", code, "Length:", length) print("Loading course...") @@ -73,7 +75,8 @@ function GetCourse(sharecode) return false end, { - ["accept-encoding"] = "gzip, deflate" + ["User-Agent"] = "Valve/Steam HTTP Client 1.0 (4000)", + ["Accept-Encoding"] = "gzip" }) end