I still didn't get to put it to work on Ubuntu 12.10 nor 12.04 (the only ones I have tried). Apparently the php curl functions might not be working the same way as worked under FreeBSD and Windows where I have tested successfully.
Solved by adding new curl option to the class of sendfiles. It has been really hard to find the absolutely not obvious solution.
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
Solved by adding new curl option to the class of sendfiles. It has been really hard to find the absolutely not obvious solution.
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));