aboutsummaryrefslogtreecommitdiff
path: root/lib/sendf.c
AgeCommit message (Collapse)Author
2010-06-19sendrecv: treat all negative values from send/recv as errorsDaniel Stenberg
For example the libssh2 based functions return other negative values than -1 to signal errors and it is important that we catch them properly. Right before this, various failures from libssh2 were treated as negative download amounts which caused havoc.
2010-05-11sendrecv: make them two pairs of send/recv to properly deal with FTPSHoward Chu
FTP(S) use two connections that can be set to different recv and send functions independently, so by introducing recv+send pairs in the same manner we already have sockets/connections we can work with FTPS fine. This commit fixes the FTPS regression introduced in change d64bd82.
2010-05-07sendrecv: split the I/O handling into private handlerHoward Chu
Howard Chu brought the bulk work of this patch that properly moves out the sending and recving of data to the parts of the code that are properly responsible for the various ways of doing so. Daniel Stenberg assisted with polishing a few bits and fixed some minor flaws in the original patch. Another upside of this patch is that we now abuse CURLcodes less with the "magic" -1 return codes and instead use CURLE_AGAIN more consistently.
2010-04-07qssl: reflect recent code changes in SSL interfaceKamil Dudka
Reported by Guenter Knauf.
2010-04-04refactorize interface of Curl_ssl_recv/Curl_ssl_sendKamil Dudka
2010-04-01fix SFTP download hangDaniel Stenberg
Matt Wixson found and fixed a bug in the SCP/SFTP area where the code treated a 0 return code from libssh2 to be the same as EAGAIN while in reality it isn't. The problem caused a hang in SFTP transfers from a MessageWay server.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-03-19- Improved Curl_read() to not ignore the error returned from Curl_ssl_recv().Kamil Dudka
2010-02-04fix printf-style format stringsYang Tse
2010-02-02Fix compiler warning: conditional expression is constantYang Tse
2010-01-22wrap long lines and do some indent policingDaniel Stenberg
2010-01-21Chris Conroy brought support for RTSP transfers, and with it comes 8(!) newDaniel Stenberg
libcurl options for controlling what to get and how to receive posssibly interleaved RTP data. Initial commit.
2009-06-10- Fabian Keil ran clang on the (lib)curl code, found a bunch of warnings andDaniel Stenberg
contributed a range of patches to fix them.
2009-05-11Internal cleanup: KEEP_WRITE and KEEP_READ are now called KEEP_SEND andDaniel Stenberg
KEEP_RECV to better match the general terminology: receive and send is what we do from the (remote) servers. We read and write from and to the local fs.
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2009-03-09- Frank Hempel found out a bug and provided the fix:Daniel Stenberg
curl_easy_duphandle did not necessarily duplicate the CURLOPT_COOKIEFILE option. It only enabled the cookie engine in the destination handle if data->cookies is not NULL (where data is the source handle). In case of a newly initialized handle which just had the cookie support enabled by a curl_easy_setopt(handle, CURL_COOKIEFILE, "")-call, handle->cookies was still NULL because the setopt-call only appends the value to data->change.cookielist, hence duplicating this handle would not have the cookie engine switched on. We also concluded that the slist-functionality would be suitable for being put in its own module rather than simply hanging out in lib/sendf.c so I created lib/slist.[ch] for them.
2009-01-07Created a CURLMIN macro to match CURLMAXDan Fandrich
2008-11-16Christian Krause fixed a build failure when building with gss supportDaniel Stenberg
enabled and FTP disabled.
2008-11-13- Fixed a potential data loss in Curl_client_write() when the transfer isMichal Marek
paused.
2008-11-02Marked with TODO comments a number of problems in the Kerberos code detectedDan Fandrich
while investigating the issue in http://curl.haxx.se/mail/lib-2008-09/0262.html I'm hesitant to fix them because I have no way of testing the result.
2008-10-22Changed some arrays of char* to arrays of char[] to reduce data size andDan Fandrich
run-time relocations.
2008-09-30fix compiler warning: enumerated type mixed with another typeYang Tse
2008-09-29made Curl_read_plain() return an 'int' instead of CURLcode since it actuallyDaniel Stenberg
returns -1 in EAGAIN cases and that's not valid CURLcode
2008-09-22- Made the SOCKS code use the new Curl_read_plain() function to fix the bugDaniel Stenberg
Markus Moeller reported: http://curl.haxx.se/mail/archive-2008-09/0016.html - recv() errors other than those equal to EAGAIN now cause proper CURLE_RECV_ERROR to get returned. This made test case 160 fail so I've now disabled it until we can figure out another way to exercise that logic.
2008-09-06remove unnecessary typecasting of malloc()Yang Tse
2008-09-05Use realloc when paused in Curl_client_writeDan Fandrich
2008-09-05- Introducing CURLOPT_CERTINFO and the corresponding CURLINFO_CERTINFO. ByDaniel Stenberg
enabling this feature with CURLOPT_CERTINFO for a request using SSL (HTTPS or FTPS), libcurl will gather lots of server certificate info and that info can then get extracted by a client after the request has completed with curl_easy_getinfo()'s CURLINFO_CERTINFO option. Linus Nielsen Feltzing helped me test and smoothen out this feature. Unfortunately, this feature currently only works with libcurl built to use OpenSSL. This feature was sponsored by networking4all.com - thanks!
2008-09-04Made some variables constDan Fandrich
2008-06-20- Hans-Jurgen May pointed out that trying SCP or SFTP over a SOCKS proxyDaniel Stenberg
crashed libcurl. This is now addressed by making sure we use "plain send" internally when doing the socks handshake instead of the Curl_write() function which is designed to use the "target" protocol. That's then SCP or SFTP in this case. I also took the opportunity and cleaned up some ssh- related #ifdefs in the code for readability.
2008-05-09- Make Curl_write and it's callees accept a const pointer, in preparationMichal Marek
of tetetest's patch for curl_easy_send()
2008-02-20- Based on initial work done by Gautam Kachroo to address a bug, we now keepDaniel Stenberg
better control at the exact state of the connection's SSL status so that we know exactly when it has completed the SSL negotiation or not so that there won't be accidental re-uses of connections that are wrongly believed to be in SSL-completed-negotiate state.
2008-01-28this was modified this year so we bump the copyright yearDaniel Stenberg
2008-01-21Dmitry Kurochkin removed the cancelled state for pipelining, as we agreedDaniel Stenberg
that it is bad anyway. Starting now, removing a handle that is in used in a pipeline will break the pipeline - it'll be set back up again but still...
2008-01-08Introducing curl_easy_pause() and new magic return codes for both the readDaniel Stenberg
and the write callbacks that now can make a connection's reading and/or writing get paused.
2007-12-09Andrew Moise filed bug report #1847501Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1847501) and pointed out a memcpy() that should be memmove() in the convert_lineends() function.
2007-12-08All static functions that were previously name Curl_* something no longerDaniel Stenberg
use that prefix as we use that prefix only for library-wide internal global symbols.
2007-11-05removed space after if and while before the parenthesis for better source codeDaniel Stenberg
consistency
2007-10-29Reverted the const change--what was I thinking?Dan Fandrich
2007-10-29Made some pointers constDan Fandrich
2007-09-27Enabled a few more gcc warnings with --enable-debug. Renamed a fewDan Fandrich
variables to avoid shadowing global declarations.
2007-07-23Implemented only the parts of Patrick Monnerat's OS/400 patch that renamedDan Fandrich
some few internal identifiers to avoid conflicts, which could be useful on other platforms.
2007-07-01Thomas J. Moore provided a patch that introduces Kerberos5 support inDaniel Stenberg
libcurl. This also makes the options change name to --krb (from --krb4) and CURLOPT_KRBLEVEL (from CURLOPT_KRB4LEVEL) but the old names are still
2007-05-02spell and language fixDaniel Stenberg
2007-04-24Robert Iakobashvili made the 'master_buffer' get allocated first once it isDaniel Stenberg
can/will be used as it then makes the common cases save 16KB of data for each easy handle that isn't used for pipelining.
2007-03-21reverted back to previous version => ↵Yang Tse
http://curl.haxx.se/mail/lib-2007-03/0258.html
2007-03-21avoid the use of variadic macros for greater portabilityYang Tse
2007-02-26Removed inclusion of <sys/types.h> and <sys/stat.h> in .c-filesGisle Vanem
since they're already included through "setup.h".
2007-02-16use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handlingYang Tse
2007-02-04Suppress warning "'nread' might be used uninitialized in this function".Gisle Vanem
2007-02-02prefer using the (upcoming) non-blocking libssh2 APIDaniel Stenberg