mirror of
https://github.com/lxsang/ant-http
synced 2024-11-18 01:08:21 +01:00
fix missing query in POST request
This commit is contained in:
parent
181ee44a51
commit
cdd4c0fa35
@ -576,8 +576,6 @@ dictionary decode_request(void* client,const char* method, char* url)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(query)
|
|
||||||
free(query);
|
|
||||||
if(ws_key)
|
if(ws_key)
|
||||||
free(ws_key);
|
free(ws_key);
|
||||||
if(ctype == NULL || clen == -1)
|
if(ctype == NULL || clen == -1)
|
||||||
@ -600,17 +598,21 @@ dictionary decode_request(void* client,const char* method, char* url)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char* query = post_data_decode(client,clen);
|
if(query)
|
||||||
|
request = decode_url_request(query);
|
||||||
|
char* pquery = post_data_decode(client,clen);
|
||||||
char* key = strstr(ctype,"/");
|
char* key = strstr(ctype,"/");
|
||||||
if(key)
|
if(key)
|
||||||
key++;
|
key++;
|
||||||
else
|
else
|
||||||
key = ctype;
|
key = ctype;
|
||||||
|
if(!request)
|
||||||
request = dict();
|
request = dict();
|
||||||
dput(request,key, strdup(query));
|
dput(request,key, strdup(pquery));
|
||||||
free(query);
|
free(pquery);
|
||||||
}
|
}
|
||||||
|
if(query)
|
||||||
|
free(query);
|
||||||
}
|
}
|
||||||
if(ctype) free(ctype);
|
if(ctype) free(ctype);
|
||||||
//if(cookie->key == NULL) {free(cookie);cookie= NULL;}
|
//if(cookie->key == NULL) {free(cookie);cookie= NULL;}
|
||||||
|
Loading…
Reference in New Issue
Block a user