com php-src: Merge branch 'pull-request/884': sapi/cgi/fastcgi.c
| From: | Stanislav Malyshev | Date: | Sun, 01 Feb 2015 08:36:53 +0000 |
| Subject: | com php-src: Merge branch 'pull-request/884': sapi/cgi/fastcgi.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84542@lists.php.net to get a copy of this message | ||
Commit: c440043de55646567ffac2e0c8d3340ad8793268
Author: Stanislav Malyshev <stas@php.net> Sun, 1 Feb 2015 00:36:53 -0800
Parents: 62d6f91b3ec694b699b8801171343ddb00b574e1 1106b10ae8729a23fbc99366dc12731a8140b775
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c440043de55646567ffac2e0c8d3340ad8793268
Log:
Merge branch 'pull-request/884'
* pull-request/884:
Fix #66479: Wrong response to FCGI_GET_VALUES
Bugs:
https://bugs.php.net/66479
Changed paths:
MM sapi/cgi/fastcgi.c
Diff:
diff --cc sapi/cgi/fastcgi.c
index 1e0702b,2b44b59..7d6fd64
--- a/sapi/cgi/fastcgi..c
+++ b/sapi/cgi/fastcgi.c
@@@ -1021,9 -989,10 +1021,10 @@@ static int fcgi_read_request(fcgi_reque
q = req->env.list;
while (q != NULL) {
if ((value = zend_hash_str_find(&fcgi_mgmt_vars, q->var, q->var_len)) == NULL) {
+ q = q->list_next;
continue;
}
- zlen = Z_STRLEN_P(value);
+ zlen = (unsigned int)Z_STRLEN_P(value);
if ((p + 4 + 4 + q->var_len + zlen) >= (buf + sizeof(buf))) {
break;
}
@@@ -1047,8 -1016,9 +1048,9 @@@
p += q->var_len;
memcpy(p, Z_STRVAL_P(value), zlen);
p += zlen;
+ q = q->list_next;
}
- len = p - buf - sizeof(fcgi_header);
+ len = (int)(p - buf - sizeof(fcgi_header));
len += fcgi_make_header((fcgi_header*)buf, FCGI_GET_VALUES_RESULT, 0, len);
if (safe_write(req, buf, sizeof(fcgi_header)+len) != (int)sizeof(fcgi_header)+len) {
req->keep = 0;