aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
AgeCommit message (Collapse)Author
2011-03-04transfer: avoid insane conversion of time_tStefan Krause
2011-01-31transfer: add Curl_meets_timecondition()Dave Reisner
This will be used by file_do() and Curl_readwrite() as a unified method of checking to see if a remote document meets the supplied CURLOPT_TIMEVAL and CURLOPT_TIMECONDITION. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-01-04Curl_timeleft: s/conn/data in first argumentDaniel Stenberg
As the function doesn't really use the connectdata struct but only the SessionHanadle struct I modified what argument it wants.
2010-12-20loadhostpairs: return errorcodeDaniel Stenberg
Make sure that Curl_cache_addr() errors are propagated to callers of loadhostpairs(). (this loadhostpairs function caused a scan-build warning due to the 'dns' variable getting assigned but never used)
2010-12-06url: provide dead_connection flag in Curl_handler::disconnectKamil Dudka
It helps to prevent a hangup with some FTP servers in case idle session timeout has exceeded. But it may be useful also for other protocols that send any quit message on disconnect. Currently used by FTP, POP3, IMAP and SMTP.
2010-11-08CURLOPT_RESOLVE: addedDaniel Stenberg
CURLOPT_RESOLVE is a new option that sends along a curl_slist with name:port:address sets that will populate the DNS cache with entries so that request can be "fooled" to use another host than what otherwise would've been used. Previously we've encouraged the use of Host: for that when dealing with HTTP, but this new feature has the added bonus that it allows the name from the URL to be used for TLS SNI and server certificate name checks as well. This is a first change. Surely more will follow to make it decent.
2010-09-17timeout: use the correct start value as offsetDaniel Stenberg
Rodric provide an awesome recipe that proved libcurl didn't timeout at the requested time - it instead often timed out at [connect time] + [timeout time] instead of the documented and intended [timeout time] only. This bug was due to the code using the wrong base offset when comparing against "now". I could also take the oppurtinity to simplify the code by properly using of the generic help function for this: Curl_timeleft. Reported by: Rodric Glaser Bug: http://curl.haxx.se/bug/view.cgi?id=3061535
2010-09-07chunky parser: only rewind if neededDaniel Stenberg
The code reading chunked encoding attempts to rewind the code if it had read more data than the chunky parser consumes. The rewinding can fail and it will then cause an error. This change now makes the rewinding only happen if pipelining is in use - as that's the only time it really needs to be done. Bug: http://curl.haxx.se/mail/lib-2010-08/0297.html Reported by: Ron Parker
2010-08-29multi: set timeouts when transfer beginsDaniel Stenberg
When a new transfer is about to start we now set the proper timeouts to expire for the multi interface if they are set for the handle. This is a follow-up bugfix to make sure that easy handles timeout properly when the times expire and the multi interface is used. This also improves curl_multi_timeout().
2010-08-06multi_socket: set timeout for 100-continueDaniel Stenberg
When libcurl internally decided to wait for a 100-continue header, there was no call to the timeout function so there was no timeout callback called when the multi_socket API was used and thus applications became either completely wrong or at least ineffecient depending on how they handled the situation. We now set a timeout to get triggered. Reported by: Ben Darnell Bug: http://curl.haxx.se/bug/view.cgi?id=3039744
2010-06-08transfer: warning: implicit conversionDaniel Stenberg
There is an implicit conversion from "unsigned long" to "long"; rounding, sign extension, or loss of accuracy may result. Fixed by an added typecast.
2010-06-02lib: eliminate some dead codeKamil Dudka
2010-05-27indent: some whitespace editsDaniel Stenberg
2010-05-12FTP: WILDCARDMATCH/CHUNKING/FNMATCH addedPavel Raiskup
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-16Curl_setup_transfer: no longer returns anythingDaniel Stenberg
This function could only return CURLE_OK and by changing it to a void instead, we can simplify code all over.
2010-04-16Curl_perform: Value stored to 'res2' is never readDaniel Stenberg
2010-03-26Make rate-limitation logic smootherBen Greear
This gives a smoother rate limitation performance by using sub-second pauses and also taking the buffer sizes into account.
2010-03-24fix: timeout after last data chunk was handledBob Richmond
Bob Richmond: There's an annoying situation where libcurl will read new HTTP response data from a socket, then check if it's a timeout if one is set. If the last packet received constitutes the end of the response body, libcurl still treats it as a timeout condition and reports a message like: "Operation timed out after 3000 milliseconds with 876 out of 876 bytes received" It should only a timeout if the timer lapsed and we DIDN'T receive the end of the response body yet.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-03-06indent fix by Ben Greear, I removed some braces for single-line conditionalDaniel Stenberg
expressions
2010-03-02- Based on patch provided by Jacob Moshenko, the transfer logic now properlyDaniel Stenberg
makes sure that when using sub-second timeouts, there's no final bad 1000ms wait. Previously, a sub-second timeout would often make the elapsed time end up the time rounded up to the nearest second (e.g. 1s for 200ms timeout)
2010-02-04fix printf-style format stringsYang Tse
2010-02-03Fix compiler warnings: conversion from 'const int ' to 'unsigned char ', ↵Yang Tse
possible loss of data
2010-02-02Fix compiler warning: conditional expression is constantYang Tse
2010-01-29RTSP followup fix. Both the pipelined and non-pipelined case need toYang Tse
check for (excess > 0 && !k->ignorebody).
2010-01-28fix printf-style format stringsYang Tse
2010-01-28fix printf-style format stringsYang Tse
2010-01-28Chris Conroy's RTSP followup fixesYang Tse
2010-01-25fix compiler warningYang Tse
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.