From: Ilia Alshanetsky Date: Mon, 23 Feb 2004 19:50:07 +0000 (+0000) Subject: Fixed bug #27341 (HEAD requests fail to return data). X-Git-Tag: RELEASE_0_2_0~207 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11366f4886da1f8cbfd5fdcd5269440b04b2e120;p=php Fixed bug #27341 (HEAD requests fail to return data). --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 8dc4bea3e4..f622c8bc77 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1132,7 +1132,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); }