diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-03-18 13:02:07 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-03-18 13:02:07 +0000 |
commit | 6d0795b9235b6752c76ca3ec0275760c4aa4da58 (patch) | |
tree | b988a0b104c5a41f0198bf24204b6824a3884890 /content | |
parent | 8ffe5f5392ce13d9510ac057ebd45d6a816b86f7 (diff) | |
download | netsurf-6d0795b9235b6752c76ca3ec0275760c4aa4da58.tar.gz netsurf-6d0795b9235b6752c76ca3ec0275760c4aa4da58.tar.bz2 |
Handle redirects with partial bodies.
svn path=/trunk/netsurf/; revision=3209
Diffstat (limited to 'content')
-rw-r--r-- | content/fetch.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/fetch.c b/content/fetch.c index fc686ace1..ddffef93a 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -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 */ |