mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 12:08:21 +01:00
http.lua: Error informatively if insufficient LuaSec support
This commit is contained in:
parent
e587800164
commit
2a467001f6
@ -35,7 +35,11 @@ local SCHEMES = {
|
||||
, https = {
|
||||
port = 443
|
||||
, create = function(t)
|
||||
return require("ssl.https").tcp(t) end }}
|
||||
local https = assert(
|
||||
require("ssl.https"), 'LuaSocket: LuaSec not found')
|
||||
local tcp = assert(
|
||||
https.tcp, 'LuaSocket: Function tcp() not available from LuaSec')
|
||||
return tcp(t) end }}
|
||||
|
||||
-- default scheme and port for document retrieval
|
||||
local SCHEME = 'http'
|
||||
|
Loading…
Reference in New Issue
Block a user