fix fastGCI size encoding bug

This commit is contained in:
DanyLE 2023-01-26 17:22:59 +01:00
parent bb14223253
commit 47e483675a
2 changed files with 2 additions and 1 deletions

1
fcgi.c
View File

@ -676,6 +676,7 @@ static int send_request(antd_client_t *cl, antd_request_t* rq)
} }
else else
{ {
// LOG("FCGI SEND QUERY STRING: %s", tmp);
ret += fcgi_send_param(cl, cl->sock, "QUERY_STRING", tmp); ret += fcgi_send_param(cl, cl->sock, "QUERY_STRING", tmp);
} }

View File

@ -154,7 +154,7 @@ int fcgi_send_param(antd_client_t* cl, int id, const char* key, const char* valu
if(clen > 0) if(clen > 0)
{ {
uint8_t encoding_type = (((k_length & 0xFF) >> 7) << 0) | (((v_length & 0xFF)>>7) << 1); uint8_t encoding_type = ((k_length>127?1:0) << 0) | ((v_length>127?1:0) << 1);
switch(encoding_type) switch(encoding_type)
{ {
case PARAMS_LENGTH_11: case PARAMS_LENGTH_11: