summaryrefslogtreecommitdiff
path: root/sapi/fpm/fpm
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-07-04 08:48:38 +0200
committerRemi Collet <remi@php.net>2018-07-05 06:30:58 +0200
commit0ea4013f101d64fbeb9221260b36e98f10ed1ddd (patch)
tree8d5489659d8cf03a4ca1dc1f97b2ecb83ef8aff4 /sapi/fpm/fpm
parent6c0ddcda47732f559eac270daafbef94562db6b9 (diff)
downloadphp-git-0ea4013f101d64fbeb9221260b36e98f10ed1ddd.tar.gz
Fixed bug #62596 add getallheaders (apache_request_headers) missing function in FPM add sapi_add_request_header in public API (was add_request_header) fix arginfo for fastcgi_finish_request fucntion
Diffstat (limited to 'sapi/fpm/fpm')
-rw-r--r--sapi/fpm/fpm/fpm_main.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 3256660264..e815be4700 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1531,6 +1531,10 @@ PHP_FUNCTION(fastcgi_finish_request) /* {{{ */
{
fcgi_request *request = (fcgi_request*) SG(server_context);
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
if (!fcgi_is_closed(request)) {
php_output_end_all();
php_header();
@@ -1545,8 +1549,27 @@ PHP_FUNCTION(fastcgi_finish_request) /* {{{ */
}
/* }}} */
+ZEND_BEGIN_ARG_INFO(cgi_fcgi_sapi_no_arginfo, 0)
+ZEND_END_ARG_INFO()
+
+PHP_FUNCTION(apache_request_headers) /* {{{ */
+{
+ fcgi_request *request;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ array_init(return_value);
+ if ((request = (fcgi_request*) SG(server_context))) {
+ fcgi_loadenv(request, sapi_add_request_header, return_value);
+ }
+} /* }}} */
+
static const zend_function_entry cgi_fcgi_sapi_functions[] = {
- PHP_FE(fastcgi_finish_request, NULL)
+ PHP_FE(fastcgi_finish_request, cgi_fcgi_sapi_no_arginfo)
+ PHP_FE(apache_request_headers, cgi_fcgi_sapi_no_arginfo)
+ PHP_FALIAS(getallheaders, apache_request_headers, cgi_fcgi_sapi_no_arginfo)
PHP_FE_END
};