Curl Error 18

We use Aspose to populate a PDF with data. Our code hasn’t changed, but it suddenly is getting an error calling your server in the function: client->send($request, $options)
PHP Fatal error: Uncaught Aspose\PDF\ApiException: [401] cURL error 18: transfer closed with outstanding read data remaining (see libcurl - Error Codes)
Here is the PHP code where its throwing an exception:
public function copyFileWithHttpInfo($src_path, $dest_path, $src_storage_name = null, $dest_storage_name = null, $version_id = null)
{
$returnType = ‘’;
$request = $this->copyFileRequest($src_path, $dest_path, $src_storage_name, $dest_storage_name, $version_id);

    try {
        $options = $this->createHttpClientOption();
        try {
            $response = $this->client->send($request, $options);
        } catch (RequestException $e) {
            throw new ApiException(
                "[{$e->getCode()}] {$e->getMessage()}",
                $e->getCode(),
                $e->getResponse() ? $e->getResponse()->getHeaders() : null,
                $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
            );
        }

@pfrworksite
Can you please share your sample document and code to reproduce the issue? We will further proceed to assist you accordingly.

4bc1dea8eb_cover_page_edited_0823.pdf (1.9 MB)
Here is the first page of the PDF we are trying to assemble.
Sometimes it fails when copying (see code in original message), other times it fails when deleting the copy(see code below). It often completes the copying of the first file we use in assembling the PDF, but it has not made it past the 2nd and there are about 10 to compile the full PDF. The error is always the same, but the point in code where it fails varies. It’s either while deleting a file in Aspose or copying a file in Aspose.

public function deleteFile($path, $storage_name = null, $version_id = null)
{
try
{
$this->deleteFileWithHttpInfo($path, $storage_name, $version_id);

    }
    catch (ApiException $ex)
    {
        if ($ex->getCode() == 401)
        {
            $this->_requestToken();
            $this->deleteFileWithHttpInfo($path, $storage_name, $version_id);
            
        }
        else
        {
            throw $ex;
        }
    }
}

@pfrworksite
We will notify you as soon as these problems are resolved.

@pfrworksite
Problems was solved.

I agree. This can be closed. Thank you!