Timeout with libcurl in PHP for POST

15 views
Skip to first unread message

SammyK

unread,
Jun 27, 2011, 10:19:47 AM6/27/11
to Donor Tools API
If you're using cURL (libcurl) with PHP and you're getting a timeout
when POSTing a new persona, donation or anything else to the API, the
reason is that the server is returning a "Connection: keep-alive"
header that is making libcurl to wait until the timeout hits before
closing.

To fix this, you need to send a "Connection: close" header with your
request. Then the server will return the proper "Connection: close"
header back and your timeout woes will go away.
Reply all
Reply to author
Forward
0 new messages