Handle redirects with partial bodies.

svn path=/trunk/netsurf/; revision=3209
This commit is contained in:
John Mark Bell 2007-03-18 13:02:07 +00:00
parent 8ffe5f5392
commit 6d0795b923

View File

@ -915,6 +915,14 @@ void fetch_done(CURL *curl_handle, CURLcode result)
; /* redirect with no body or similar */
else
finished = true;
} else if (result == CURLE_PARTIAL_FILE) {
/* CURLE_PARTIAL_FILE occurs if the received body of a
* response is smaller than that specified in the
* Content-Length header. */
if (!f->had_headers && fetch_process_headers(f))
; /* redirect with partial body, or similar */
else
error = true;
} else if (result == CURLE_WRITE_ERROR && f->stopped)
/* CURLE_WRITE_ERROR occurs when fetch_curl_data
* returns 0, which we use to abort intentionally */