Why the empty Content-Type in nginx, php-fpm?

Good day!
Faced with the problem of getting HTTP headers.
Use nginx and php-fpm. The job was that it was necessary to obtain additional title and check it out.
Used alternative function getallheaders:
if (!function_exists('getallheaders'))
{
 function getallheaders()
{
 $headers = ";
 foreach ($_SERVER as $name => $value)
{
 if (substr($name, 0, 5) == 'HTTP_')
{
 $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
}
}
 return $headers;
}
}


Her record variable with HTTP_ key from the variable $_SERVER
In the Nginx configuration indicated:
location ~ \.php$ {
 include /etc/nginx/fastcgi_params;
 location 127.0.0.1:9000;
 try_files $uri =404;

 fastcgi_index index.php;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 fastcgi_param CONTENT_TYPE $content_type;
 fastcgi_param CONTENT_LENGTH $content_length;

 fastcgi_param HTTP_HOST $host;
 fastcgi_param HTTP_CONTENT_TYPE $content_type;
 fastcgi_param HTTP_CONTENT_HMAC $http_content_hmac;

 access_log /var/log/nginx/postdata.log main_post;
}


I can not understand why the variable $_SERVER[CONTENT_TYPE] passes an empty value?
Interested in the same question: how to specify in the config an optional parameter in my example is a Content-HMAC. For output in logs variable indicated "http_content_hmac"

Thanks in advance for the help!
July 9th 19 at 10:49

Find more questions by tags NginxPHPPHP-FPM