Changelog
+Michal Marek (13 Nov 2008)
+- Fixed a potential data loss in Curl_client_write() when the transfer is
+ paused.
+
Daniel Stenberg (11 Nov 2008)
- Rainer Canavan filed bug #2255627
(http://curl.haxx.se/bug/view.cgi?id=2255627) which pointed out that a
}
-/* client_write() sends data to the write callback(s)
+/* Curl_client_write() sends data to the write callback(s)
The bit pattern defines to what "streams" to write to. Body and/or header.
The defines are in sendf.h of course.
struct SessionHandle *data = conn->data;
size_t wrote;
+ if(0 == len)
+ len = strlen(ptr);
+
/* If reading is actually paused, we're forced to append this chunk of data
to the already held data, but only if it is the same type as otherwise it
can't work and it'll return error instead. */
return CURLE_OK;
}
- if(0 == len)
- len = strlen(ptr);
-
if(type & CLIENTWRITE_BODY) {
if((conn->protocol&PROT_FTP) && conn->proto.ftpc.transfertype == 'A') {
#ifdef CURL_DOES_CONVERSIONS