mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
parent
10fa64b7e3
commit
842e5603a1
@ -128,4 +128,18 @@ class Request extends Zend_Controller_Request_Http
|
|||||||
? Json::decode(file_get_contents('php://input'), true)
|
? Json::decode(file_get_contents('php://input'), true)
|
||||||
: parent::getPost($key, $default);
|
: parent::getPost($key, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract and return the media type from the given header value
|
||||||
|
*
|
||||||
|
* @param string $headerValue
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function extractMediaType($headerValue)
|
||||||
|
{
|
||||||
|
// Pretty basic and does not care about parameters
|
||||||
|
$parts = explode(';', $headerValue, 2);
|
||||||
|
return strtolower(trim($parts[0]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user