diff --git a/lib/sendf.c b/lib/sendf.c index 7901108c12b0e2236387fb8d9fbc6a503349bfc4..26d1831d89568ddcb5028de37840da335e2d7730 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -270,7 +270,11 @@ CURLcode Curl_write(struct connectdata *conn, int sockfd, #ifdef WIN32 if(WSAEWOULDBLOCK == GetLastError()) #else - if(EWOULDBLOCK == errno) + /* As pointed out by Christophe Demory on March 11 2003, errno + may be EWOULDBLOCK or on some systems EAGAIN when it returned + due to its inability to send off data without blocking. We + therefor treat both error codes the same here */ + if((EWOULDBLOCK == errno) || ((EAGAIN == errno)) #endif { /* this is just a case of EWOULDBLOCK */