Check request for 'upgrade' being set

along with the path check, should check that the request is an upgrade before assuming to do anything with it really.
This commit is contained in:
d3x0r 2016-09-30 16:54:06 -07:00 committed by GitHub
parent b2f78bc128
commit a472f33e66

View File

@ -67,6 +67,7 @@
gun.wsp.server = gun.wsp.server || function(req, res, next){ // http
next = next || function(){};
if(!req || !res){ return next(), false }
if(!req.upgrade){ return next(), false }
if(!req.url){ return next(), false }
if(!req.method){ return next(), false }
var msg = {};