aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
AgeCommit message (Collapse)Author
2010-01-22wrap long lines, remove (very old) attribution from codeDaniel 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.
2010-01-07removed a parameter from the Curl_http_readwrite_headers() prototype to removeDaniel Stenberg
the need for the struct forward declaration from http.h which caused problems with gcc 2.96 and quite frankly the parameter wasn't necessary anyway
2009-12-30moved the SMTP payload escape function into Curl_smtp_escape_eob and putDaniel Stenberg
it in smtp.c
2009-12-30(SMTP) support DATA better in the server and make sure to "escape" CRLF.CRLFDaniel Stenberg
sequences in uploaded data. The test server doesn't "decode" escaped dot-lines but instead test cases must be written to take them into account. Added test case 803 to verify dot-escaping.
2009-12-29move HTTP-specific functions to http.c where they belongDaniel Stenberg
2009-12-12introducing IMAP, POP3 and SMTP support (still lots of polish left to do)Daniel Stenberg
2009-12-11Prevent rewinding unless pipelining.Yang Tse
See http://curl.haxx.se/mail/lib-2009-12/0107.html
2009-11-12Add missing variable initializationYang Tse
2009-11-12- libcurl-NSS now tries to reconnect with TLS disabled in case it detectsKamil Dudka
a broken TLS server. However it does not happen if SSL version is selected manually. The approach was originally taken from PSM. Kaspar Brand helped me to complete the patch. Original bug reports: https://bugzilla.redhat.com/525496 https://bugzilla.redhat.com/527771
2009-09-27tiny indent fixDaniel Stenberg
2009-09-27- I introduced a maximum limit for received HTTP headers. It is controlled byDaniel Stenberg
the define CURL_MAX_HTTP_HEADER which is even exposed in the public header file to allow for users to fairly easy rebuild libcurl with a modified limit. The rationale for a fixed limit is that libcurl is realloc()ing a buffer to be able to put a full header into it, so that it can call the header callback with the entire header, but that also risk getting it into trouble if a server by mistake or willingly sends a header that is more or less without an end. The limit is set to 100K.
2009-09-27unify two very similar code sections into one single function, header_append()Daniel Stenberg
2009-09-26- Implemented a protocol independent way to specify blocking direction, used byKamil Dudka
transfer.c for blocking. It is currently used only by SCP and SFTP protocols. This enhancement resolves an issue with 100% CPU usage during SFTP upload, reported by Vourhey.
2009-08-21- Andre Guibert de Bruet pointed out a missing return code check for aDaniel Stenberg
strdup() that could lead to segfault if it returned NULL. I extended his suggest patch to now have Curl_retry_request() return a regular return code and better check that.
2009-08-21- Lots of good work by Krister Johansen, mostly related to pipelining:Daniel Stenberg
Fix SIGSEGV on free'd easy_conn when pipe unexpectedly breaks Fix data corruption issue with re-connected transfers Fix use after free if we're completed but easy_conn not NULL
2009-07-16added a cast to silent compiler warning with 64bit systems.Gunter Knauf
2009-06-10Adjusted to take in account that...Yang Tse
With the curl memory tracking feature decoupled from the debug build feature, CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows: CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug) DEBUGBUILD used for debug enabled specific code (--enable-debug)
2009-05-28fix compiler warning: variable was set but never usedYang Tse
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-05-07Fix an issue, affecting FTP transfers, introduced with the transfer.c patch ↵Yang Tse
committed May 4. Additionally some identation fixes.
2009-05-04David McCreedy's "transfer.c fixes for CURL_DO_LINEEND_CONV and non-ASCII ↵Yang Tse
platform HTTP requests" patch
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2009-02-27Indentation fixes, untabify and related whitespace-cleanup. No code changed.Daniel Stenberg
2009-02-19- Patrik Thunstrom reported a problem and helped me repeat it. It turned outDaniel Stenberg
libcurl did a superfluous 1000ms wait when doing SFTP downloads! We read data with libssh2 while doing the "DO" operation for SFTP and then when we were about to start getting data for the actual file part, the "TRANSFER" part, we waited for socket action (in 1000ms) before doing a libssh2-read. But in this case libssh2 had already read and buffered the data so we ended up always just waiting 1000ms before we get working on the data!
2009-02-11- CURLINFO_CONDITION_UNMET was added to allow an application to get to know ifDaniel Stenberg
the condition in the previous request was unmet. This is typically a time condition set with CURLOPT_TIMECONDITION and was previously not possible to reliably figure out. From bug report #2565128 (http://curl.haxx.se/bug/view.cgi?id=2565128)
2009-01-07Created a CURLMIN macro to match CURLMAXDan Fandrich
2008-12-19- Using the libssh2 0.19 function libssh2_session_block_directions(), libcurlDaniel Stenberg
now has an improved ability to do right when the multi interface (both "regular" and multi_socket) is used for SCP and SFTP transfers. This should result in (much) less busy-loop situations and thus less CPU usage with no speed loss.
2008-11-14Added some #ifdefs around header files and change the EAGAIN test toDan Fandrich
fix compilation on Cell (reported by Jeff Curley).
2008-10-29Fixed a bug that caused a few bytes of garbage to be sent after aDan Fandrich
curl_easy_pause() during a chunky upload. Reported by Steve Roskowski.
2008-10-23moved the Curl_raw_ functions into the new lib/rawstr.c file for easier curlx_Daniel Stenberg
inclusion by the curl tool without colliding with the curl_strequal functions.
2008-10-19Fixed a compiler warning in the CURL_DISABLE_HTTP caseDan Fandrich
2008-10-18Removed some more code in the CURL_DISABLE_HTTP caseDan Fandrich
2008-10-17fix compiler warningYang Tse
2008-10-15- John Wilkinson filed bug #2155496Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2155496) pointing out an error case without a proper human-readable error message. When a read callback returns a too large value (like when trying to return a negative number) it would trigger and the generic error message then makes the proplem slightly different to track down. I've added an error message for this now.
2008-10-10Fixed some compiler warnings with CURL_DISABLE_HTTPDan Fandrich
2008-10-09Get rid of some more code in the CURL_DISABLE_HTTP caseDan Fandrich
2008-10-08- Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified andDaniel Stenberg
fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing: Any subsequent transfer with a redirect leaks memory, eventually crashing the process potentially. Any subsequent transfer WITHOUT a redirect causes the most recent redirect that DID occur on some previous transfer to still be reported.
2008-10-07Changed the handling of read/write errors in Curl_perform() to allow aDan Fandrich
a fresh connection to be made in such cases and the request retransmitted. This should fix test case 160. Added test case 1079 in an attempt to test a similar connection dropping scenario, but as a race condition, it's hard to test reliably.
2008-09-08fix compiler warningYang Tse
2008-09-08comment < 80 columnsDaniel Stenberg
2008-09-06remove unnecessary typecasting of malloc()Yang Tse
2008-09-06remove unnecessary typecasting of realloc()Yang Tse
2008-09-05Improved the logic the decides whether to use HTTP 1.1 features or not in aDan Fandrich
request. Detect cases where an upload must be sent chunked and the server supports only HTTP 1.0 and return CURLE_UPLOAD_FAILED.
2008-09-05- Martin Drasar provided the CURLOPT_POSTREDIR patch. It renamesDaniel Stenberg
CURLOPT_POST301 (but adds a define for backwards compatibility for you who don't define CURL_NO_OLDIES). This option allows you to now also change the libcurl behavior for a HTTP response 302 after a POST to not use GET in the subsequent request (when CURLOPT_FOLLOWLOCATION is enabled). I edited the patch somewhat before commit. The curl tool got a matching --post302 option. Test case 1076 was added to verify this.
2008-08-29- When libcurl was doing a HTTP POST and the server would respond withDaniel Stenberg
"Connection: close" and actually close the connection after the response-body, libcurl could still have outstanding data to send and it would not properly notice this and stop sending. This caused weirdness and sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222 Note that there are still reasons to consider libcurl's behavior when getting a >= 400 response code while sending data, as Craig Perras' note "http upload: how to stop on error" specifies: http://curl.haxx.se/mail/archive-2008-08/0138.html
2008-08-26Fixed out of memory problems that caused torture test failures in testsDan Fandrich
1021 and 1067.
2008-08-16Library internal only C preprocessor macros FORMAT_OFF_T and FORMAT_OFF_TUYang Tse
remain in use as internal curl_off_t print formatting strings for the internal *printf functions which still cannot handle print formatting string directives such as "I64d", "I64u", and others available on MSVC, MinGW, Intel's ICC, and other DOS/Windows compilers. This reverts previous commit part which did: FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-15For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros,Yang Tse
the names of the curl_off_t formatting string directives now become CURL_FORMAT_CURL_OFF_T and CURL_FORMAT_CURL_OFF_TU. CURL_FMT_OFF_T -> CURL_FORMAT_CURL_OFF_T CURL_FMT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU Remove the use of an internal name for the curl_off_t formatting string directives and use the common one available from the inside and outside of the library. FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-12Fix 'result' may be used uninitialized in function readwrite_data()Yang Tse