summaryrefslogtreecommitdiff
path: root/ext/curl/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/curl/interface.c')
-rw-r--r--ext/curl/interface.c3
1 files changed, 2 insertions, 1 deletions
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);
}