From: Ilia Alshanetsky Date: Mon, 23 Feb 2004 19:50:47 +0000 (+0000) Subject: MFH: Fixed bug #27341 (HEAD requests fail to return data). X-Git-Tag: php-4.3.5RC4~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0551c2a7ca965dd317d6d5b6192d5d38f698f87;p=php MFH: Fixed bug #27341 (HEAD requests fail to return data). --- diff --git a/NEWS b/NEWS index 4f8460cbe9..c18c3b0254 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Feb 2004, Version 4.3.5 +- Fixed bug #27341 (HEAD requests fail to return data). (Ilia) - Fixed bug #27337 (missing sapi_shutdown() in sapi/isapi causes memory leak). (Jani, msisolak at yahoo dot com) - Fixed bug #27328 (ftp extension relies on 32-bit longs). (Sara) diff --git a/ext/curl/curl.c b/ext/curl/curl.c index e583a675cd..64c637bb1b 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -1020,7 +1020,8 @@ PHP_FUNCTION(curl_exec) error = curl_easy_perform(ch->cp); SAVE_CURL_ERROR(ch, error); - if (error != CURLE_OK) { + /* CURLE_PARTIAL_FILE is returned by HEAD requests */ + if (error != CURLE_OK && error != CURLE_PARTIAL_FILE) { if (ch->handlers->write->buf.len > 0) { smart_str_free(&ch->handlers->write->buf); }