mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
Fix #66479: Wrong response to FCGI_GET_VALUES
Requesting Get-Values via FCGI caused an "endless" loop over the last requested parameter and ended with an invalid response. this patch solves this loop bug.
This commit is contained in:
parent
af22cd665c
commit
1106b10ae8
1 changed files with 2 additions and 0 deletions
|
@ -989,6 +989,7 @@ static int fcgi_read_request(fcgi_request *req)
|
||||||
q = req->env.list;
|
q = req->env.list;
|
||||||
while (q != NULL) {
|
while (q != NULL) {
|
||||||
if ((value = zend_hash_str_find(&fcgi_mgmt_vars, q->var, q->var_len)) == NULL) {
|
if ((value = zend_hash_str_find(&fcgi_mgmt_vars, q->var, q->var_len)) == NULL) {
|
||||||
|
q = q->list_next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
zlen = Z_STRLEN_P(value);
|
zlen = Z_STRLEN_P(value);
|
||||||
|
@ -1015,6 +1016,7 @@ static int fcgi_read_request(fcgi_request *req)
|
||||||
p += q->var_len;
|
p += q->var_len;
|
||||||
memcpy(p, Z_STRVAL_P(value), zlen);
|
memcpy(p, Z_STRVAL_P(value), zlen);
|
||||||
p += zlen;
|
p += zlen;
|
||||||
|
q = q->list_next;
|
||||||
}
|
}
|
||||||
len = p - buf - sizeof(fcgi_header);
|
len = p - buf - sizeof(fcgi_header);
|
||||||
len += fcgi_make_header((fcgi_header*)buf, FCGI_GET_VALUES_RESULT, 0, len);
|
len += fcgi_make_header((fcgi_header*)buf, FCGI_GET_VALUES_RESULT, 0, len);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue