From 94685a0210e7cdf22b06942124eced21259aedc2 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 28 Jan 2017 13:00:49 +0100 Subject: [PATCH] Fixed the way that curl sends post data with multipart content-type --- lib/api/source/sync.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/api/source/sync.php b/lib/api/source/sync.php index 9702da9..930a22c 100755 --- a/lib/api/source/sync.php +++ b/lib/api/source/sync.php @@ -75,16 +75,16 @@ $postarray['renew'] = $new; /* (3) Parse postfiels to multipart format */ - $postraw = "--$boundary"; + #$postraw = "--$boundary"; - foreach($postarray as $postkey=>$postvalue) - $postraw .= "\r\nContent-Disposition: form-data; name=\"$postkey\"\r\n\r\n$postvalue\r\n--$boundary"; + #foreach($postarray as $postkey=>$postvalue) + # $postraw .= "\r\nContent-Disposition: form-data; name=\"$postkey\"\r\n\r\n$postvalue\r\n--$boundary"; - $postraw .= "--"; + #$postraw .= "--"; /* (4) Set postdata raw to curl */ - curl_setopt($curl, CURLOPT_POSTFIELDS, $postraw); + curl_setopt($curl, CURLOPT_POSTFIELDS, $postarray);