From a0dd5b7f2fb908a1e0c0bfea02ea9f1a3b1eaee8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 20 Nov 2008 12:42:42 +0100 Subject: curl: don't check running_handles for EOF Since we are using curl_multi_info_read() / CURLMSG_DONE for detecting end-of-response, we can remove all running_handles==0 checks. For some reason, that has never worked correctly. --- src/input_curl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/input_curl.c b/src/input_curl.c index 06261a7ab..20b26a9ed 100644 --- a/src/input_curl.c +++ b/src/input_curl.c @@ -268,8 +268,6 @@ input_curl_read(struct input_stream *is, void *ptr, size_t size) bret = input_curl_multi_info_read(is); if (!bret) return 0; - - c->eof = running_handles == 0; } /* send buffer contents */ @@ -347,8 +345,6 @@ input_curl_buffer(struct input_stream *is) if (!ret) return -1; - c->eof = running_handles == 0; - return c->buffered; } @@ -482,8 +478,6 @@ input_curl_send_request(struct input_curl *c) mcode = curl_multi_perform(c->multi, &running_handles); } while (mcode == CURLM_CALL_MULTI_PERFORM); - c->eof = running_handles == 0; - if (mcode != CURLM_OK) { g_warning("curl_multi_perform() failed: %s\n", curl_multi_strerror(mcode)); @@ -616,7 +610,7 @@ input_curl_seek(struct input_stream *is, off_t offset, int whence) if (!ret) return false; - return true; + return input_curl_multi_info_read(is); } static bool -- cgit v1.2.3