cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1618359 ] Problem downloading 2 zero byte files with FTP

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 20 Dec 2006 08:33:24 -0800

Bugs item #1618359, was opened at 2006-12-18 18:10
Message generated for change (Comment added) made by braga
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1618359&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: hang
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Robson Braga Araujo (braga)
Assigned to: Daniel Stenberg (bagder)
Summary: Problem downloading 2 zero byte files with FTP

Initial Comment:
Hi,

When downloading 2 zero byte files in a row, curl 7.16.0 enters an infinite loop, while curl 7.16.1-20061218 does one additional unnecessary request.

I tracked this problem to the variable headerbytecount being 0 in Curl_retry_request function. This used to be a number bigger than zero in curl-7.15.5 and older. Here is a simple program that will trigger this problem:

#include <curl/curl.h>
#include <curl/easy.h>

int main() {
  CURLcode curl_res;
  CURL* easy;

  curl_global_init(CURL_GLOBAL_ALL);
  easy = curl_easy_init();
  curl_easy_setopt(easy, CURLOPT_VERBOSE, 1);
  curl_easy_setopt(easy, CURLOPT_URL, "ftp://ftp.sunet.se/pub/Linux/funet/sunsite_is_now_metalab_under_mirrors");

  curl_res = curl_easy_perform(easy);

  curl_res = curl_easy_perform(easy);

  return 0;
}

----------------------------------------------------------------------

>Comment By: Robson Braga Araujo (braga)
Date: 2006-12-20 14:33

Message:
Logged In: YES
user_id=307089
Originator: YES

I attached a patch against 7.16.1-20061218 to fix this problem.

During the "Major overhaul introducing http pipelining support and shared
connection
cache within the multi handle." change, headerbytecount was moved to live
in the Curl_transfer_keeper structure. But that structure is reset in the
Transfer method, losing the information that we had about the header size.
This patch moves it back to the connectdata struct.
File Added: curl-headerbytecount.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1618359&group_id=976
Received on 2006-12-20

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET