From 904401617a4f4ea866668bcedd6a1f52c60d9ee0 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 26 May 2023 10:17:53 +0000 Subject: mod magic make a get request instead of post and remove digest header --- Zotlabs/Module/Magic.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Magic.php') diff --git a/Zotlabs/Module/Magic.php b/Zotlabs/Module/Magic.php index 6d997c662..8259f7d39 100644 --- a/Zotlabs/Module/Magic.php +++ b/Zotlabs/Module/Magic.php @@ -105,13 +105,13 @@ class Magic extends Controller { $headers['Accept'] = 'application/x-zot+json' ; $headers['Content-Type'] = 'application/x-zot+json' ; $headers['X-Open-Web-Auth'] = random_string(); - $headers['Digest'] = HTTPSig::generate_digest_header($data); $headers['Host'] = $parsed['host']; - $headers['(request-target)'] = 'post ' . '/owa'; + $headers['(request-target)'] = 'get ' . '/owa'; $headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'], channel_url($channel),true,'sha512'); $redirects = 0; - $x = z_post_url($owapath,$data,$redirects,[ 'headers' => $headers ]); + $x = z_fetch_url($owapath, false, $redirects, ['headers' => $headers]); + logger('owa fetch returned: ' . print_r($x,true),LOGGER_DATA); if ($x['success']) { $j = json_decode($x['body'],true); -- cgit v1.2.3