aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
AgeCommit message (Collapse)Author
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-29Fixed the resumed FTP upload loop to not require that the read callbackDaniel Stenberg
returns a full buffer on each invoke.
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-07if () => if()Daniel Stenberg
while () => while() and some other minor re-indentings
2007-11-05removed space after if and while before the parenthesis for better source codeDaniel Stenberg
consistency
2007-11-02avoid setting up a transfer when the state machine failed previouslyDaniel Stenberg
2007-11-01minor re-indentDaniel Stenberg
2007-10-26Fixed a valgrind uninitialized variable error.Dan Fandrich
2007-10-24Curl_ftp_disconnect() no longer relies on anything in the reqdata struct. ThatDaniel Stenberg
was even mentioned to be bad in a comment! Should make test 2000 and 2001 work fine. Also, freedirs() now take a ftp_conn struct pointer which saves some extra unnecessary variable assignments.
2007-10-22Michal Marek forwarded the bug reportDaniel Stenberg
https://bugzilla.novell.com/show_bug.cgi?id=332917 about a HTTP redirect to FTP that caused memory havoc. His work together with my efforts created two fixes: #1 - FTP::file was moved to struct ftp_conn, because is has to be dealt with at connection cleanup, at which time the struct HandleData could be used by another connection. Also, the unused char *urlpath member is removed from struct FTP. #2 - provide a Curl_reset_reqproto() function that frees data->reqdata.proto.* on connection setup if needed (that is if the SessionHandle was used by a different connection).
2007-10-17We use this ZERO_NULL to avoid picky compiler warnings,Yang Tse
when assigning a NULL pointer to a function pointer var.
2007-10-13Made a few more functions static with the protocol handler table in place.Dan Fandrich
2007-10-12Fixed a few compile errors and warnings.Dan Fandrich
2007-10-12Added per-protocol callback static tables, replacing callback ptr storagePatrick Monnerat
in the connectdata structure by a single handler table ptr.
2007-10-02Fix memory leak under low memory conditions.Yang Tse
2007-10-02Fix compiler warningYang Tse
2007-09-27Renamed a few variables to avoid shadowing global declarations.Dan Fandrich
2007-09-27Enabled a few more gcc warnings with --enable-debug. Renamed a fewDan Fandrich
variables to avoid shadowing global declarations.
2007-09-26Max Katsev reported that when doing a libcurl FTP request withDaniel Stenberg
CURLOPT_NOBODY enabled but not CURLOPT_HEADER, libcurl wouldn't do TYPE before it does SIZE which makes it less useful. I walked over the code and made it do this properly, and added test case 542 to verify it.
2007-09-24Immanuel Gregoire fixed KNOWN_BUGS #44: --ftp-method nocwd did not handleDaniel Stenberg
URLs ending with a slash properly (it should list the contents of that directory). Test case 351 brought back and also test 1010 was added.
2007-09-11- I noticed while writing test 541 that the FTP code wrongly did a CWD on theDaniel Stenberg
second transfer as it didn't store and remember the "" path from the previous transfer so it would instead CWD to the entry path as stored. This worked, but did a superfluous command. Thus, test case 541 now also verifies this fix.
2007-09-05Curl_GetFTPResponse() now checks and properly deals with the fact that theDaniel Stenberg
underlying ftp_readresp() function has a separate "cache" where there might in fact be leftover data...
2007-08-31Renamed the CURLE_FTP_SSL_FAILED error code to CURLE_USE_SSL_FAILED.Dan Fandrich
Renamed the curl_ftpssl enum to curl_usessl and its enumerated constants, creating macros for backward compatibility.
2007-08-30Renamed several libcurl error codes and options to make them more generalDan Fandrich
and allow reuse by multiple protocols. Several unused error codes were removed. In all cases, macros were added to preserve source (and binary) compatibility with the old names. These macros are subject to removal at a future date, but probably not before 2009. An application can be tested to see if it is using any obsolete code by compiling it with the CURL_NO_OLDIES macro defined. Documented some newer error codes in libcurl-error(3)
2007-08-30Made Curl_GetFTPResponse() use lots less code and instead use the properDaniel Stenberg
low-level ftp_readresp() function. Hopefully adressing bug #1779054.
2007-08-27Fixed some minor type mismatches and missing consts mainly found by splint.Dan Fandrich
2007-08-24Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointedDaniel Stenberg
out that libcurl didn't deal with large responses from server commands, when the single response was consisting of multiple lines but of a total size of 16KB or more. Dan Fandrich improved the ftp test script and provided test case 1006 to repeat the problem, and I fixed the code to make sure this new test case runs fine.
2007-08-22Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointedDaniel Stenberg
out that libcurl didn't deal with very long (>16K) FTP server response lines properly. Starting now, libcurl will chop them off (thus the client app will not get the full line) but survive and deal with them fine otherwise. Test case 1003 was added to verify this.
2007-08-20Based on a patch by Christian Vogt, the FTP code now sets the upcomingDaniel Stenberg
download transfer size much earlier to be possible to get read with CURLINFO_CONTENT_LENGTH_DOWNLOAD as soon as possible.
2007-08-17- Robson Braga Araujo filed bug report #1776232Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1776232) about libcurl calling Curl_client_write(), passing on a const string that the caller may not modify and yet it does (on some platforms).
2007-08-17Robson Braga Araujo filed bug report #1776235Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1776235) about ftp requests with NOBODY on a directory would do a "SIZE (null)" request. This is now fixed and test case 1000 was added to verify.
2007-08-01Patrick Monnerat and I modified libcurl so that now it *copies* all stringsDaniel Stenberg
passed to it with curl_easy_setopt()! Previously it has always just refered to the data, forcing the user to keep the data around until libcurl is done with it. That is now history and libcurl will instead clone the given strings and keep private copies.
2007-07-29Bug report #1759542 (http://curl.haxx.se/bug/view.cgi?id=1759542). A bad useDaniel Stenberg
of a socket after it has been closed, when the FTP-SSL data connection is taken down.
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-21Make the pointers of a few static const arrays const, too, for safety.Dan Fandrich
2007-07-20Ralf S. Engelschall filed bug report #1757328Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1757328) and submitted a patch. It turns out we broke login to FTP servers that don't require (nor understand) PASS after the USER command
2007-07-20Made some const arrays static to avoid unnecessary stack usage.Dan Fandrich
2007-07-17Jofell Gallardo posted a libcurl log using FTP that exposed a bug which madeDaniel Stenberg
a control connection that was deemed "dead" to yet be re-used in a following request. We must make sure the connection gets closed on this situation.
2007-07-13Daniel Cater made libcurl build with CURL_NO_OLDIES defined (which doesn'tDaniel Stenberg
define the symbols for backwards source compatibility)
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-07-01Song Ma helped me verify and extend a fix for doing FTP over a SOCKS4/5 proxyDaniel Stenberg
2007-06-24As reported by "Tro" in http://curl.haxx.se/mail/lib-2007-06/0161.html andDaniel Stenberg
http://curl.haxx.se/mail/lib-2007-06/0238.html, libcurl didn't properly do no-body requests on FTP files on re-used connections properly, or at least it didn't provide the info back in the header callback properly in the subsequent requests.
2007-06-19and fix another flaw in the singlecwd case when we get ftp://site.com/, alsoDaniel Stenberg
from the #1739100 bug report
2007-06-18make the ftp-method multicwd case possible to LIST the root directory of aDaniel Stenberg
server!
2007-04-25Fixed an out of memory handling issue.Dan Fandrich
2007-04-22Avoid an unnecessary call to gettimeofday() whenYang Tse
using custom timeout values.
2007-04-12Work around an out of memory situation in Curl_ftp_done instead ofDan Fandrich
returning an error code, to allow connections to be torn down cleanly since this function can be called AFTER an OOM situation has already been reached.
2007-04-11Fixed some out of memory handling issues.Dan Fandrich
2007-04-10Ravi Pratap provided fixes for HTTP pipeliningDaniel Stenberg
2007-03-31Removed check for ftpcode being NULL, as later it is derefenced unconditionallyDaniel Stenberg
anyway and we can just as well rely on it being valid. CID 12, coverity.com scan