Fixed bug #27341 (HEAD requests fail to return data).

This commit is contained in:
Ilia Alshanetsky 2004-02-23 19:50:07 +00:00
parent 769dc0be75
commit 11366f4886

View File

@ -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);
}