mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-04-05 02:06:58 +00:00
Fir error in http.request _post error cheacking code and add package.config to shell require code to support standard better.
This commit is contained in:
parent
fc93ee474f
commit
6255314ba8
@ -729,8 +729,8 @@ if http then
|
||||
if type( _url ) ~= "string" then
|
||||
error( "bad argument #1 (expected string, got " .. type( _url ) .. ")", 2 )
|
||||
end
|
||||
if _post ~= nil and type( _post ) ~= "table" then
|
||||
error( "bad argument #2 (expected table, got " .. type( _post ) .. ")", 2 )
|
||||
if _post ~= nil and type( _post ) ~= "string" then
|
||||
error( "bad argument #2 (expected string, got " .. type( _post ) .. ")", 2 )
|
||||
end
|
||||
if _headers ~= nil and type( _headers ) ~= "table" then
|
||||
error( "bad argument #3 (expected table, got " .. type( _headers ) .. ")", 2 )
|
||||
|
@ -31,6 +31,7 @@ local function createShellEnv( sDir )
|
||||
table = table,
|
||||
}
|
||||
package.path = "?;?.lua;?/init.lua"
|
||||
package.config = "/\n;\n?\n!\n-"
|
||||
package.preload = {}
|
||||
package.loaders = {
|
||||
function( name )
|
||||
|
Loading…
x
Reference in New Issue
Block a user