Updated
This commit is contained in:
@@ -206,6 +206,24 @@ function vs01_post_to_orchestrator($envelope, $config = null) {
|
||||
$curl_error = curl_error($ch);
|
||||
curl_close($ch);
|
||||
|
||||
// --- DEBUG LOGGING ---
|
||||
// Writes every orchestrator POST attempt (request + response) to a
|
||||
// dedicated debug log, independent of timing. Read with:
|
||||
// tail -50 /var/www/hubzilla/addon/vs01/debug.log
|
||||
// Remove this block once the 400 root cause is found and fixed.
|
||||
@file_put_contents(
|
||||
__DIR__ . '/debug.log',
|
||||
'[' . date('c') . "] vs01 POST to orchestrator\n" .
|
||||
" url: $receiver_url\n" .
|
||||
" http_code: $http_code\n" .
|
||||
" curl_error: " . ($curl_error ?: '(none)') . "\n" .
|
||||
" request_payload: $payload\n" .
|
||||
" response_body: " . ($response === false ? '(curl failed)' : $response) . "\n" .
|
||||
"----\n",
|
||||
FILE_APPEND
|
||||
);
|
||||
// --- END DEBUG LOGGING ---
|
||||
|
||||
if ($curl_error) {
|
||||
logger('vs01_spool: curl error: ' . $curl_error);
|
||||
return 'Network error: ' . $curl_error;
|
||||
|
||||
Reference in New Issue
Block a user