You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this workaround #7 (comment) for having REST-love work on Windows
I get this error with README SimpleExample 's when getting non existent / non valid url
Error: Thread error (Thread: 0x01c2cdc66900)
string:24: attempt to index local 'resp' (a boolean value)
stack traceback:
string:24: in function '_WIN_REST'
string:41: in main chunk
stack traceback:
[string "boot.lua"]:777: in function <[string "boot.lua"]:773>
[C]: in function 'error'
[string "boot.lua"]:631: in function <[string "boot.lua"]:630>
[string "boot.lua"]:604: in function <[string "boot.lua"]:594>
[C]: in function 'xpcall'
The text was updated successfully, but these errors were encountered:
lmfff
changed the title
Non existent / Non valid crashes application on Windows
Non existent / Non valid url crashes application on Windows
Feb 19, 2022
This seems to be solved by editing the _WIN_REST function in rest-lib/win-rest.lua
This:
if(isHead) then
return resp.raw_headers
else
return resp.body
end
could be changed to this:
if resp then
if(isHead) then
return resp.raw_headers
else
return resp.body
end
else
return false
end
To avoid indexing "resp" when it is a boolean value (false). I also return false if resp is false.
This needs to be changed both in the function declaration and when creating the thread with this function.
Using this workaround #7 (comment) for having REST-love work on Windows
I get this error with README SimpleExample 's when getting non existent / non valid url
The text was updated successfully, but these errors were encountered: