Closed cdn closed 11 years ago
More specifically the call to parseHeaders() is returning the data it was fed, such that json_decode() cannot decipher the data.
Return data: HTTP/1.1 100 Continue
HTTP/1.1 200 OK ---8<--
That gap between the HTTP 100 and 200 is throwing off the parsing in parseHeaders()
diff --git a/AppDotNet.php b/AppDotNet.php index 720a0d0..9865d4c 100644 --- a/AppDotNet.php +++ b/AppDotNet.php @@ -303,6 +303,12 @@ class AppDotNet {
$response = explode("\r\n\r\n",$response,2);
$headers = $response[0];
if($headers == 'HTTP/1.1 100 Continue') {
$response = explode("\r\n\r\n",$response[1],2);
$headers = $response[0];
}
if (isset($response[1])) {
$content = $response[1];
}
Will amend my fork and submit another pull request.
$ok = $app->createFile($file, array('metadata' => 'file.type'); leaves me with nothing in $ok
$ok2 = $app->getLastResponse(); called afterwards clearly shows expected return data with file id and token.
Has anyone else seen this?