1
0
mirror of https://github.com/lxsang/ant-http synced 2024-07-01 12:59:47 +02:00

fix libantd

This commit is contained in:
Xuan Sang LE 2018-09-18 10:33:42 +02:00
parent 6fbf3d4984
commit 6d77ccd318

View File

@ -304,7 +304,10 @@ void unknow(void* client)
}
int ws_enable(dictionary dic)
{
return (dic != NULL && R_INT(dic,"__web_socket__") == 1);
if(!dic) return 0;
char*v = (char*)dvalue(dic, "__web_socket__");
if(!v) return 0;
return atoi(v) == 1;
}
/**
* read the request as a string line format