aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2022-11-30 00:17:30 -0500
committerAdam Harrison <adamdharrison@gmail.com>2022-11-30 00:17:30 -0500
commite9f81a21e5b8831327fedaad4c5605524fb4f30f (patch)
tree89d13afd4c66ef7d03bda8fc1f07d69c291dc7d3 /src
parent979bf050a2ee8abdbf8c6b3556ac4fc051be8de9 (diff)
downloadlite-xl-plugin-manager-e9f81a21e5b8831327fedaad4c5605524fb4f30f.tar.gz
lite-xl-plugin-manager-e9f81a21e5b8831327fedaad4c5605524fb4f30f.zip
Fixed redirect loops.
Diffstat (limited to 'src')
-rw-r--r--src/lpm.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index c8198d8..f49f8b1 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -461,7 +461,7 @@ end
function common.get(source, target, checksum, depth)
if not source then error("requires url") end
- if depth > 10 then error("too many redirects") end
+ if (depth or 0) > 10 then error("too many redirects") end
local _, _, protocol, hostname, port, rest = source:find("^(https?)://([^:/?]+):?(%d*)(.*)$")
if not protocol then error("malfomed url " .. source) end
if not port or port == "" then port = protocol == "https" and 443 or 80 end