cURL / Mailing Lists / curl-library / Single Mail


[ curl-Bugs-994165 ] fwrite() informs of a partial write for no good reason

From: <>
Date: Mon, 19 Jul 2004 16:15:02 -0700

Bugs item #994165, was opened at 2004-07-19 16:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Category: http
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: fwrite() informs of a partial write for no good reason

Initial Comment:
Working on libcurl for c++ version 7.11.1

Steps to reproduce:
1. Create a set of HTTP files, writing data to each one
of them as follows
for (int i=0 ;< 20; i++)
   1. Call Curl_Open() for file name http://<http-
   2. Call a Curl_Write operation with buffer size = 20000
   3. Call a Write operation with buffer size = 40000
   4. Call a Curl-Close() operation
The problem occurs in sendf.c function: Curl_client_write
where fwrite returns wrote < len.
I checked GetLastError() which equal to 0 to indicate no
system error.

My name : Orna Haber
My email address

The attached zip file includes 2 source files that
illustrates the steps to reproduce and my proposed
soltion to the problem in sendf.c (sendf.c of version


You can respond by visiting:
Received on 2004-07-20