From 1b17ab8d388c82dfb5ad8b40e89907e73cddd8d7 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 28 Jan 2017 17:59:54 +0100 Subject: [PATCH] fixed array instead of raw form-data --- lib/api/source/sync.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/api/source/sync.php b/lib/api/source/sync.php index 930a22c..48507b0 100755 --- a/lib/api/source/sync.php +++ b/lib/api/source/sync.php @@ -46,7 +46,7 @@ if( is_null($data) ){ slog("api:fetch returned unreadable content", 'api:sync'); - $data = "{}"; + $data = []; } @@ -67,7 +67,7 @@ /* (1) Set post data */ $postarray = [ 'token' => $hash, - 'data' => $data + 'data' => json_encode($data) ]; /* (2) Add renew if renew */ @@ -90,10 +90,9 @@ /* [4] Manage headers =========================================================*/ - curl_setopt($curl, CURLOPT_HTTPHEADER, [ - "Content-Type: multipart/form-data; boundary=$boundary", - "Content-Length: ".strlen($postraw) - ]); + #curl_setopt($curl, CURLOPT_HTTPHEADER, [ + # "Content-Type: multipart/form-data" + #]); /* [5] Send and catch request response