diff --git a/fcgi.c b/fcgi.c index 50ad41a..f7b401a 100644 --- a/fcgi.c +++ b/fcgi.c @@ -676,6 +676,7 @@ static int send_request(antd_client_t *cl, antd_request_t* rq) } else { + // LOG("FCGI SEND QUERY STRING: %s", tmp); ret += fcgi_send_param(cl, cl->sock, "QUERY_STRING", tmp); } diff --git a/proto.c b/proto.c index 85a7d0f..16c5f30 100644 --- a/proto.c +++ b/proto.c @@ -154,7 +154,7 @@ int fcgi_send_param(antd_client_t* cl, int id, const char* key, const char* valu 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) { case PARAMS_LENGTH_11: