aboutsummaryrefslogtreecommitdiff
path: root/lib/sendf.c
AgeCommit message (Collapse)Author
2012-12-14setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>Yang Tse
Inclusion of top two most included header files now done in setup_once.h
2012-11-12Curl_write: remove unneeded typecastDaniel Stenberg
2011-09-26remove short-lived CURL_WRITEFUNC_OUT_OF_MEMORYYang Tse
2011-09-25allow write callbacks to indicate OOM to libcurlYang Tse
Allow (*curl_write_callback) write callbacks to return CURL_WRITEFUNC_OUT_OF_MEMORY to properly indicate libcurl of OOM conditions inside the callback itself.
2011-09-05fix bool variables checking and assignmentYang Tse
2011-08-26Curl_read_plain: indent codeDaniel Stenberg
2011-07-26stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.hYang Tse
2011-07-24errno.h inclusion conditionally done in setup_once.hYang Tse
2011-05-21compiler warning: fixYang Tse
Fix compiler warning: enumerated type mixed with another type
2011-05-05RTSP: cleanupsDaniel Stenberg
Made several functions static Made one function defined to nothing when RTSP is disabled to avoid the #ifdefs in code. Removed explicit rtsp.h includes
2011-04-27source cleanup: unify look, style and indent levelsDaniel Stenberg
By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
2011-04-21Fix a couple of spelling errors in lib/Fabian Keil
Found with codespell.
2011-04-20CURL_DOES_CONVERSIONS: cleanupDaniel Stenberg
Massively reduce #ifdefs all over (23 #ifdef lines less so far) Moved conversion-specific code to non-ascii.c
2011-03-14protocols: use CURLPROTO_ internallyDaniel Stenberg
The PROT_* set of internal defines for the protocols is no longer used. We now use the same bits internally as we have defined in the public header using the CURLPROTO_ prefix. This is for simplicity and because the PROT_* prefix was already used duplicated internally for a set of KRB4 values. The PROTOPT_* defines were moved up to just below the struct definition within which they are used.
2011-03-14protocol handler: added flags fieldDaniel Stenberg
The protocol handler struct got a 'flags' field for special information and characteristics of the given protocol. This now enables us to move away central protocol information such as CLOSEACTION and DUALCHANNEL from single defines in a central place, out to each protocol's definition. It also made us stop abusing the protocol field for other info than the protocol, and we could start cleaning up other protocol-specific things by adding flags bits to set in the handler struct. The "protocol" field connectdata struct was removed as well and the code now refers directly to the conn->handler->protocol field instead. To make things work properly, the code now always store a conn->given pointer that points out the original handler struct so that the code can learn details from the original protocol even if conn->handler is modified along the way - for example when switching to go over a HTTP proxy.
2010-12-05Curl_send/recv_plain: return errno on failureDaniel Stenberg
When send() and recv() fail, we now store the errno value to allow the app to access it. Bug: http://curl.haxx.se/bug/view.cgi?id=3128121 Reported by: Yuri
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.