cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-519392 ] add_buffer_send problem

From: <noreply_at_sourceforge.net>
Date: Mon, 18 Feb 2002 10:22:22 -0800

Bugs item #519392, was opened at 2002-02-18 10:19
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=519392&group_id=976

Category: libcurl
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Philip Gladstone (philipjsg)
Assigned to: Daniel Stenberg (bagder)
Summary: add_buffer_send problem

Initial Comment:
The code in http.c/add_buffer_send that tries to deal with Curl_write not writing the whole buffer
is broken -- the line 'size += amount;' should read 'size -= amount;'

However, this raises a couple of issues now that the sockets are non-blocking.

* Where should the select for writing be done? Inside curl_write or in add_buffer_send? Currently
the code just goes into a hard loop trying to write. My take is that it should happen inside
curl_write, though it is rather unclear what the timeout ought to be.

* What about the other callers of curl_write that don't bother to see if they actually could write,
and just assume that it worked (Curl_sendf, and two telnet places)?

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

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=519392&group_id=976
Received on 2002-02-18