krinklemail at gmail dot com - 2 years ago [0]
If requests to your PHP script send a header "Content-Type" or/ "Content-Length" it will, contrary to regular HTTP headers, not appear in $_SERVER as $_SERVER['HTTP_CONTENTTYPE']. PHP removes these (per CGI/1.1 specification[1]) from the HTTP match group.
They are still accessible, but only if the request was a POST request. When it is, it'll be available as:
$_SERVER['CONTENT_LENGTH']
$_SERVER['CONTENT_TYPE']
krinklemail at gmail dot com - 2 years ago [0] If requests to your PHP script send a header "Content-Type" or/ "Content-Length" it will, contrary to regular HTTP headers, not appear in $_SERVER as $_SERVER['HTTP_CONTENTTYPE']. PHP removes these (per CGI/1.1 specification[1]) from the HTTP match group.
They are still accessible, but only if the request was a POST request. When it is, it'll be available as: $_SERVER['CONTENT_LENGTH'] $_SERVER['CONTENT_TYPE']
[0] http://php.net/manual/en/reserved.variables.server.php [1] https://www.ietf.org/rfc/rfc3875