소스 검색

stole some code from AmandaC to handle an undocumented condition with 404 errors returned by the internet card

master
XeonSquared 3 년 전
부모
커밋
5e9baee9fa
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. +8
    -1
      lib/download.lua

+ 8
- 1
lib/download.lua 파일 보기

@@ -85,8 +85,15 @@ function dl.protos.http(host, optPort, path, dest, url) -- string string string
local R,r=component.invoke(component.list("internet")(),"request",url)
if not R then error(r) end
repeat
ok, err = R.finishConnect()
if type(ok) ~= "boolean" then
if err == url then
return 404, "This is a bug in OC, I think?"
end
return -1, err or "Connection Error"
end
coroutine.yield()
until R.finishConnect()
until ok
local code, messsage, headers
repeat
coroutine.yield()


불러오는 중...
취소
저장