jakobM to Testcommunity Lemmy • 1 year agoNoch ein Testsoc.schuerz.atmessage-square34fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1external-linkNoch ein Testsoc.schuerz.atjakobM to Testcommunity Lemmy • 1 year agomessage-square34fedilinkfile-text
minus-squareheluechtlinkfedilink1•1 year ago@jakob Ich sende einen HTTP-Request mit einem Accept-Headerapplication/activity+json und erwarte JSON-LD - und erhalte normales HTML.
minus-squarejakobOPMlinkfedilink1•1 year ago@heluecht Viellrich ist in der nginx.conf irgendwas fehlerhaft… Ich schau mir das an. Komm aber erst am Montag aller Voraussicht nach dazu.
minus-squareheluechtlinkfedilink1•1 year ago@jakob Ich habe https://lemmy.schuerz.at/c/test und https://lemmy.schuerz.at verwendet.
minus-squareheluechtlinkfedilink1•1 year ago@jakob Du kannst dieses Script versuchen: #!/usr/bin/env php <?php use Friendica\DI; use Friendica\Util\HTTPSignature; use Friendica\Network\HTTPClient\Client\HttpClientOptions; require dirname(__DIR__) . '/vendor/autoload.php'; $dice = new \Dice\Dice(); $dice = $dice->addRules(include __DIR__ . '/../static/dependencies.config.php'); DI::init($dice); $url = 'https://lemmy.ml/u/OptimusPrime'; $url = 'https://lemmy.ml/u/OptimusPrime/outbox'; $url = 'https://lemmy.ml'; $url = 'https://lemmy.schuerz.at/c/test'; $url = 'https://lemmy.schuerz.at'; $data = HTTPSignature::fetchRaw($url, 0, [HttpClientOptions::ACCEPT_CONTENT => 'application/activity+json']); echo $data->getBody() . "\n\n" . $data->getContentType() . "\n"; die(); Das speicherst Du im local-Ordner ab und startest es dann per php local/lemmy.php (oder wie auch immer Du es nennen möchtest) Dann siehst Du, dass die Ausgabe anders ist, abhängig vom Server.
minus-squareJakob :lemmy:MAlink1•1 year agoWar offenbar ein Konfigurationsfehler meinerseits… Jetzt sollte es passen.
@jakob Ich sende einen HTTP-Request mit einem Accept-Header
application/activity+json
und erwarte JSON-LD - und erhalte normales HTML.@heluecht
Viellrich ist in der nginx.conf irgendwas fehlerhaft…
Ich schau mir das an.
Komm aber erst am Montag aller Voraussicht nach dazu.
@heluecht
An welcgen Pfad schickst du das?
@jakob Ich habe
https://lemmy.schuerz.at/c/test
undhttps://lemmy.schuerz.at
verwendet.@jakob Du kannst dieses Script versuchen:
#!/usr/bin/env php <?php use Friendica\DI; use Friendica\Util\HTTPSignature; use Friendica\Network\HTTPClient\Client\HttpClientOptions; require dirname(__DIR__) . '/vendor/autoload.php'; $dice = new \Dice\Dice(); $dice = $dice->addRules(include __DIR__ . '/../static/dependencies.config.php'); DI::init($dice); $url = 'https://lemmy.ml/u/OptimusPrime'; $url = 'https://lemmy.ml/u/OptimusPrime/outbox'; $url = 'https://lemmy.ml'; $url = 'https://lemmy.schuerz.at/c/test'; $url = 'https://lemmy.schuerz.at'; $data = HTTPSignature::fetchRaw($url, 0, [HttpClientOptions::ACCEPT_CONTENT => 'application/activity+json']); echo $data->getBody() . "\n\n" . $data->getContentType() . "\n"; die();
Das speicherst Du im
local
-Ordner ab und startest es dann perphp local/lemmy.php
(oder wie auch immer Du es nennen möchtest)Dann siehst Du, dass die Ausgabe anders ist, abhängig vom Server.
War offenbar ein Konfigurationsfehler meinerseits…
Jetzt sollte es passen.
@heluecht
Vielrn Dank.
Ich werds mir ansehen.