net.websocket: Honour ex.insecure to match net.http's new parameter for that

This commit is contained in:
Matthew Wild 2018-06-08 16:30:46 +01:00
parent 3892eb5063
commit 74bfc82312

View file

@ -236,6 +236,7 @@ local function connect(url, ex, listeners)
method = "GET";
headers = headers;
sslctx = ex.sslctx;
insecure = ex.insecure;
}, function(b, c, r, http_req)
if c ~= 101
or r.headers["connection"]:lower() ~= "upgrade"