mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-14 00:47:00 -05:00
stole some code from AmandaC to handle an undocumented condition with 404 errors returned by the internet card
This commit is contained in:
parent
4a5d9bcee2
commit
5e9baee9fa
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user