mirror of
https://github.com/friendica/friendica
synced 2025-01-30 23:39:47 +00:00
Fix codestyle
This commit is contained in:
parent
bccf95a088
commit
0f8786f8b1
1 changed files with 28 additions and 22 deletions
|
@ -57,11 +57,13 @@ class HTTPSignature
|
|||
|
||||
// Decide if $data arrived via controller submission or curl.
|
||||
$headers = [];
|
||||
|
||||
$headers['(request-target)'] = strtolower(DI::args()->getMethod()) . ' ' . $_SERVER['REQUEST_URI'];
|
||||
|
||||
foreach ($_SERVER as $k => $v) {
|
||||
if (strpos($k, 'HTTP_') === 0) {
|
||||
$field = str_replace('_', '-', strtolower(substr($k, 5)));
|
||||
|
||||
$headers[$field] = $v;
|
||||
}
|
||||
}
|
||||
|
@ -98,6 +100,7 @@ class HTTPSignature
|
|||
|
||||
if ($key && function_exists($key)) {
|
||||
$result['signer'] = $sig_block['keyId'];
|
||||
|
||||
$key = $key($sig_block['keyId']);
|
||||
}
|
||||
|
||||
|
@ -387,7 +390,7 @@ class HTTPSignature
|
|||
* @param int $gsid Server ID
|
||||
* @throws \Exception
|
||||
*/
|
||||
static public function setInboxStatus(string $url, bool $success, bool $shared = false, int $gsid = null)
|
||||
public static function setInboxStatus(string $url, bool $success, bool $shared = false, int $gsid = null)
|
||||
{
|
||||
$now = DateTimeFormat::utcNow();
|
||||
|
||||
|
@ -631,11 +634,13 @@ class HTTPSignature
|
|||
}
|
||||
|
||||
$headers = [];
|
||||
|
||||
$headers['(request-target)'] = strtolower(DI::args()->getMethod()) . ' ' . parse_url($http_headers['REQUEST_URI'], PHP_URL_PATH);
|
||||
|
||||
// First take every header
|
||||
foreach ($http_headers as $k => $v) {
|
||||
$field = str_replace('_', '-', strtolower($k));
|
||||
|
||||
$headers[$field] = $v;
|
||||
}
|
||||
|
||||
|
@ -643,6 +648,7 @@ class HTTPSignature
|
|||
foreach ($http_headers as $k => $v) {
|
||||
if (strpos($k, 'HTTP_') === 0) {
|
||||
$field = str_replace('_', '-', strtolower(substr($k, 5)));
|
||||
|
||||
$headers[$field] = $v;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue