mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Add getallheaders() function if not natively available
This commit is contained in:
parent
82e8d1ff7c
commit
d42945030f
17
soap.php
17
soap.php
@ -32,7 +32,22 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
/* Note: this command only available under Apache */
|
||||
/* Note: this command only available natively in Apache (Netscape/iPlanet/SunONE in php >= 4.3.3) */
|
||||
if(!function_exists('getallheaders'))
|
||||
{
|
||||
function getallheaders()
|
||||
{
|
||||
settype($headers,'array');
|
||||
foreach($_SERVER as $h => $v)
|
||||
{
|
||||
if(ereg('HTTP_(.+)',$h,$hp))
|
||||
{
|
||||
$headers[$hp[1]] = $v;
|
||||
}
|
||||
}
|
||||
return $headers;
|
||||
}
|
||||
}
|
||||
$headers = getallheaders();
|
||||
|
||||
if(ereg('Basic',$headers['Authorization']))
|
||||
|
18
xmlrpc.php
18
xmlrpc.php
@ -37,8 +37,24 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
/* Note: this command only available under Apache */
|
||||
/* Note: this command only available natively in Apache (Netscape/iPlanet/SunONE in php >= 4.3.3) */
|
||||
if(!function_exists('getallheaders'))
|
||||
{
|
||||
function getallheaders()
|
||||
{
|
||||
settype($headers,'array');
|
||||
foreach($_SERVER as $h => $v)
|
||||
{
|
||||
if(ereg('HTTP_(.+)',$h,$hp))
|
||||
{
|
||||
$headers[$hp[1]] = $v;
|
||||
}
|
||||
}
|
||||
return $headers;
|
||||
}
|
||||
}
|
||||
$headers = getallheaders();
|
||||
|
||||
//print_r($headers);
|
||||
$isodate = $headers['isoDate'] ? $headers['isoDate'] : $headers['isodate'];
|
||||
$isodate = ($isodate == 'simple') ? True : False;
|
||||
|
Loading…
Reference in New Issue
Block a user