1
0
mirror of https://github.com/lxsang/ant-http synced 2024-07-03 13:39:46 +02:00

fix invalid read

This commit is contained in:
Xuan Sang LE 2018-03-17 20:54:38 +01:00
parent 64b27c0dd3
commit 5b8850550f

View File

@ -518,7 +518,8 @@ dictionary decode_request(void* client,const char* method, char* url)
token = strsep(&line,":");
trim(token,' ');
trim(line,' ');
dput(xheader,token,strdup(line));
if(token && line && strlen(line) > 0)
dput(xheader,token,strdup(line));
if(token != NULL &&strcasecmp(token,"Cookie") == 0)
{
if(!cookie) cookie = decode_cookie(line);