aboutsummaryrefslogtreecommitdiff
path: root/lib/easy.c
AgeCommit message (Collapse)Author
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-04-04disable cookies: remove ifdefs, move codeDaniel Stenberg
1 - make sure to #define macros for cookie functions in the cookie header when cookies are disabled to avoid having to use #ifdefs in code using those functions. 2 - move cookie-specific code to cookie.c and use the functio conditionally as mentioned in (1). net result: 6 #if lines removed, and 9 lines of code less
2010-12-07easy: fix compiler warning: end-of-loop code not reachedYang Tse
2010-12-02fix compiler warning: statement is not reachableYang Tse
2010-11-08fix compiler warningYang Tse
2010-09-21duphandle: use ares_dup()Daniel Stenberg
curl_easy_duphandle() was not properly duping the ares channel. The ares_dup() function was introduced in c-ares 1.6.0 so by starting to use this function we also raise the bar and require c-ares >= 1.6.0 (released Dec 9, 2008) for such builds. Reported by: Ning Dong Bug: http://curl.haxx.se/mail/lib-2010-08/0318.html
2010-09-06portabilty: use proper variable type to hold socketsDaniel Stenberg
Curl_getconnectinfo() is changed to return a proper curl_socket_t for the last socket so that it'll work more portably (and cause less compiler warnings).
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-26SSH: init and cleanup libssh2 in global_init/cleanupDaniel Stenberg
The necessary libssh2 functions require libssh2 1.2.5 or later.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-02-04fix printf-style format stringsYang Tse
2010-01-22wrap long lines and do some indent policingDaniel Stenberg
2009-11-18Make usage of calloc()'s arguments consistent with rest of code baseYang Tse
2009-10-27Fix Pelles C Win32 target compilation issuesYang Tse
2009-09-17Moved Curl_rand() and Curl_srand() code from formdata.c and formdata.hYang Tse
into curl_rand.c and curl_rand.h
2009-06-15Replaced use of standard C library rand()/srand() by our own pseudo-random ↵Patrick Monnerat
number generator.
2009-06-12fix compiler warningYang Tse
2009-05-18Simplify c-ares function capability checkYang Tse
2009-05-17fixed case.Gunter Knauf
2009-05-17Take in account c-ares 1.6.1 introduces ares_library_init() and ↵Yang Tse
ares_library_cleanup()
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-04-11fix compiler warning: enumerated type mixed with another typeYang Tse
2009-03-31Properly return an error code in curl_easy_recv (reported by Jim Freeman).Dan Fandrich
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-29Introduced curl_sspi.c and curl_sspi.h for the implementation of functionsYang Tse
Curl_sspi_global_init() and Curl_sspi_global_cleanup() which previously were named Curl_ntlm_global_init() and Curl_ntlm_global_cleanup() in http_ntlm.c Also adjusted socks_sspi.c to remove the link-time dependency on the Windows SSPI library using it now in the same way as it was done in http_ntlm.c.
2009-01-08Unified much of the SessionHandle initialization done in Curl_open() andDan Fandrich
curl_easy_reset() by creating Curl_init_userdefined(). This had the side effect of fixing curl_easy_reset() so it now also resets CURLOPT_FTP_FILEMETHOD and CURLOPT_SSL_SESSIONID_CACHE
2008-12-11- Bug report #2416182 titled "crash in ConnectionExists when usingDaniel Stenberg
duphandle+curl_mutli" (http://curl.haxx.se/bug/view.cgi?id=2416182) showed that curl_easy_duphandle() wrongly also copied the pointer to the connection cache, which was plain wrong and caused a segfault if the handle would be used in a different multi handle than the handle it was duplicated from.
2008-10-19attempt to fix or allow further detection of an elusive icc SIGSEGVYang Tse
2008-09-30fix compiler warning: declaration of 'err' shadows a previous localYang Tse
2008-09-29Removed unneeded includes of signal.h and setjmp.hDan Fandrich
2008-09-10Checked in some grammatical and minor other fixes in the documentation andDan Fandrich
examples that I found in the FreeBSD ports system.
2008-09-06remove unnecessary typecasting of malloc()Yang Tse
2008-09-06remove unnecessary typecasting of calloc()Yang Tse
2008-09-05- Dmitriy Sergeyev pointed out that curl_easy_pause() didn't unpause properlyDaniel Stenberg
during certain conditions. I also changed this code to use realloc() based on Daniel Fandrich's suggestion.
2008-08-31MSVC adjustmentYang Tse
2008-08-28minor code indent fixesDaniel Stenberg
2008-08-11- Constantine Sapuntzakis filed bug report #2042430Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2042430) with a patch. "NTLM Windows SSPI code is not thread safe". This was due to libcurl using static variables to tell wether to load the necessary SSPI DLL, but now the loading has been moved to the more suitable curl_global_init() call.
2008-05-12- Introducing curl_easy_send() and curl_easy_recv(). They can be used to sendDaniel Stenberg
and receive data over a connection previously setup with curl_easy_perform() and its CURLOPT_CONNECT_ONLY option. The sendrecv.c example was added to show how they can be used.
2008-04-22Added support for running on Symbian OS.Dan Fandrich
2008-04-05- Alexey Simak fixed curl_easy_reset() to reset the max redirect limit properlyDaniel Stenberg
2008-03-31Removed the generated ca-bundle.h file. The verbatim value of $ca andMichal Marek
$capath is known to configure, so it can be defined in config.h instead.
2008-03-20- Added --with-ca-path=DIRECTORY configure option to use an openSSL CApath byMichal Marek
default instead of a ca bundle. The configure script will also look for a ca path if no ca bundle is found and no option given. - Fixed detection of previously installed curl-ca-bundle.crt
2008-03-18- Added curl_easy_getinfo typechecker.Michal Marek
- Added macros for curl_share_setopt and curl_multi_setopt to check at least the correct number of arguments.
2008-03-11- Added a type checking macro for curl_easy_setopt(), needs gcc-4.3 and onlyMichal Marek
works in C mode atm (http://curl.haxx.se/mail/lib-2008-02/0267.html , http://curl.haxx.se/mail/lib-2008-02/0292.html )
2008-01-15Woops, partly revert my previous commit and do it slightly differently instead.Daniel Stenberg
The signalling of that a global DNS cache is wanted is done by setting the option but the setting of the internal variable that it is in use must not be done until it finally actually gets used! NOTE and WARNING: I noticed that you can't actually switch off the global dns cache with CURLOPT_DNS_USE_GLOBAL_CACHE but you couldn't do that previously either and the option is very clearly and loudly documented as DO NOTE USE so I won't bother to fix this bug now.
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-11-24struct HandleData is now called struct SingleRequest, and is only for data thatDaniel Stenberg
is inited at the start of the DO action. I removed the Curl_transfer_keeper struct completely, and I had to move out a few struct members (that had to be set before DO or used after DONE) to the UrlState struct. The SingleRequest struct is accessed with SessionHandle->req. One of the biggest reasons for doing this was the bunch of duplicate struct members in HandleData and Curl_transfer_keeper since it was really messy to keep track of two variables with the same name and basically the same purpose!
2007-11-20white space changes only to clean up indent and source widthDaniel Stenberg
2007-11-05removed space after if and while before the parenthesis for better source codeDaniel Stenberg
consistency