diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2022-11-30 00:17:30 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2022-11-30 00:17:30 -0500 |
commit | e9f81a21e5b8831327fedaad4c5605524fb4f30f (patch) | |
tree | 89d13afd4c66ef7d03bda8fc1f07d69c291dc7d3 /src/lpm.lua | |
parent | 979bf050a2ee8abdbf8c6b3556ac4fc051be8de9 (diff) | |
download | lite-xl-plugin-manager-e9f81a21e5b8831327fedaad4c5605524fb4f30f.tar.gz lite-xl-plugin-manager-e9f81a21e5b8831327fedaad4c5605524fb4f30f.zip |
Fixed redirect loops.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r-- | src/lpm.lua | 2 |
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 |