curl error: SSL_write() returned SYSCALL, errno = 32
toomas.aas at raad.tartu.ee
Wed Jul 11 15:19:14 UTC 2012
> Recently I upgraded a lot of ports on one of our FreeBSD 7.4
> servers. Among others I upgraded curl from 7.19.6 to 7.24.0, and php
> from 5.2.11 to 5.3.13. PHP's curl extension is also installed.
> After the upgrade, an application which tries to POST some data over
> https using PHP's curl_exec() function, is having trouble.
> curl_error() returns the following after the POST request:
> SSL_write() returned SYSCALL, errno = 32
Some modifications in PHP code made everything happy again.
1. Removed the Expect: 100-continue HTTP header from requests sent by
curl, by adding empty Expect: header
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect: '));
2. Made sure CURLOPT_POSTFIELDS is an url-encoded query string instead
of being a plain PHP array:
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($myarray));
More information about the freebsd-questions