Fixing style errors.
This commit is contained in:
parent
bcb3265678
commit
5463a705c7
@ -315,19 +315,17 @@ Luracast\Restler\Defaults::$returnResponse = true;
|
|||||||
//print $api->r->handle();
|
//print $api->r->handle();
|
||||||
|
|
||||||
$result = $api->r->handle();
|
$result = $api->r->handle();
|
||||||
if(isset($_SERVER['HTTP_ACCEPT_ENCODING'])) {
|
if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) {
|
||||||
if(strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'br') !== false && is_callable('brotli_compress')) {
|
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'br') !== false && is_callable('brotli_compress')) {
|
||||||
header('Content-Encoding: br');
|
header('Content-Encoding: br');
|
||||||
$result = brotli_compress($result, 11, BROTLI_TEXT);
|
$result = brotli_compress($result, 11, BROTLI_TEXT);
|
||||||
}
|
} elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'bz') !== false && is_callable('bzcompress')) {
|
||||||
elseif(strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'bz') !== false && is_callable('bzcompress')) {
|
header('Content-Encoding: bz');
|
||||||
header('Content-Encoding: bz');
|
$result = bzcompress($result, 9);
|
||||||
$result = bzcompress($result, 9);
|
} elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && is_callable('gzencode')) {
|
||||||
}
|
header('Content-Encoding: gzip');
|
||||||
elseif(strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && is_callable('gzencode')) {
|
$result = gzencode($result, 9);
|
||||||
header('Content-Encoding: gzip');
|
}
|
||||||
$result = gzencode($result, 9);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
echo $result;
|
echo $result;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user