mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-10-08 13:05:30 +00:00
Use Content-Type header stored in CONTENT_TYPE per RFC 3875
Normalize $_SERVER['CONTENT_TYPE'] with value from $_SERVER['HTTP_CONTENT_TYPE']
This commit is contained in:
@@ -4,6 +4,9 @@ $_PUT = array();
|
||||
$_PATCH = array();
|
||||
|
||||
$request_method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '';
|
||||
if (!array_key_exists('CONTENT_TYPE', $_SERVER) && array_key_exists('HTTP_CONTENT_TYPE', $_SERVER)) {
|
||||
$_SERVER['CONTENT_TYPE'] = $_SERVER['HTTP_CONTENT_TYPE'];
|
||||
}
|
||||
$content_type = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : '';
|
||||
$data_values = $_GET;
|
||||
if ($request_method === 'POST') {
|
||||
|
||||
Reference in New Issue
Block a user