aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
AgeCommit message (Collapse)Author
2009-07-09- Eric Wong introduced curlx_nonblock() that the curl tool now (re-)uses forDaniel Stenberg
setting a file descriptor non-blocking. Used by the functionality Eric himself brough on June 15th.
2009-07-04added INET_ADDRSTRLEN define in case system headers dont provide.Gunter Knauf
2009-07-04removed NIFLAGS which is no longer used; added NI_MAXHOST since its missing ↵Gunter Knauf
with some platforms.
2009-07-04Markus Koetter provided a patch to avoid getnameinfo() usage which broke a ↵Gunter Knauf
couple of both IPv4 and IPv6 autobuilds.
2009-06-30Tor Arntsen pointed out a missing #ifdef for IPv6, and I changed another oneDaniel Stenberg
to use the "standard" ENABLE_IPV6 one. Also, if port number cannot be figured out to connect to after a name resolve (due to it not being IPv4 or IPv6), that particular address will now simply be skipped.
2009-06-29- Markus Koetter made CURLOPT_FTPPORT (and curl's -P/--ftpport) support a portDaniel Stenberg
range if given colon-separated after the host name/address part. Like "192.168.0.1:2000-10000"
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-19- Kamil Dudka brought the patch from the Redhat bug entryDaniel Stenberg
https://bugzilla.redhat.com/show_bug.cgi?id=427966 which was libcurl closing a bad file descriptor when closing down the FTP data connection. Caolan McNamara seems to be the original author of it.
2009-05-12Reverted my change to use Curl_connected_proxy() here. Clearly I wasn'tDaniel Stenberg
thinking straight.
2009-05-11moved variables more locally to get rid of one set of #ifdefsDaniel Stenberg
2009-05-11Use Curl_connected_proxy() here instead of duplicating code. Spell out theDaniel Stenberg
badness in the code flow even for the socks case.
2009-05-07- Made the SO_SNDBUF setting for the data connection socket for ftp uploads asDaniel Stenberg
well. See change 28 Apr 2009.
2009-05-02Use build-time configured curl_socklen_t instead of socklen_tYang Tse
2009-04-28- Bug report #2709004 (http://curl.haxx.se/bug/view.cgi?id=2709004) by TimDaniel Stenberg
Chen pointed out how curl couldn't upload with resume when reading from a pipe. This ended up with the introduction of a new return code for the CURLOPT_SEEKFUNCTION callback that basically says that the seek failed but that libcurl may try to resolve the situation anyway. In our case this means libcurl will attempt to instead read that much data from the stream instead of seeking and that way curl can now upload with resume when data is read from a stream!
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2009-04-20- Leanic Lefever reported a crash and did some detailed research on why andDaniel Stenberg
how it occurs (http://curl.haxx.se/mail/lib-2009-04/0289.html). The conclusion was that if an error is detected and Curl_done() is called for the connection, ftp_done() could at times return another error code that then would take precedence and that new code confused existing logic that works for the first error code (CURLE_SEND_ERROR) only.
2009-04-19attempt to workaround icc 9.1 optimizer induced problemYang Tse
2009-04-17- Pramod Sharma reported and tracked down a bug when doing FTP over a HTTPDaniel Stenberg
proxy. libcurl would then wrongly close the connection after each request. In his case it had the weird side-effect that it killed NTLM auth for the proxy causing an inifinite loop! I added test case 1098 to verify this fix. The test case does however not properly verify that the transfers are done persistently - as I couldn't think of a clever way to achieve it right now - but you need to read the stderr output after a test run to see that it truly did the right thing.
2009-04-01- Andre Guibert de Bruet fixed a NULL pointer use in an infof() call if aDaniel Stenberg
strdup() call failed.
2009-03-09Avoid a compile warning in --disable-proxy caseDan Fandrich
2009-02-20- Linus Nielsen Feltzing reported and helped me repeat and fix a problem withDaniel Stenberg
FTP with the multi interface: when a transfer fails, like when aborted by a write callback, the control connection was wrongly closed and thus not re-used properly. This change is also an attempt to cleanup the code somewhat in this area, as now the FTP code attempts to keep (better) track on pending responses necessary to get read in ftp_done().
2009-02-18FTP downloads (i.e.: RETR) ending with code 550 now return error ↵Patrick Monnerat
CURLE_REMOTE_FILE_NOT_FOUND instead of CURLE_FTP_COULDNT_RETR_FILE.
2009-02-17- CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 in addition to 1 forDaniel Stenberg
plain FTP connections, and it will then allow MKD to fail once and retry the CWD afterwards. This is especially useful if you're doing many simultanoes connections against the same server and they all have this option enabled, as then CWD may first fail but then another connection does MKD before this connection and thus MKD fails but trying CWD works! The numbers can (should?) now be set with the convenience enums now called CURLFTP_CREATE_DIR and CURLFTP_CREATE_DIR_RETRY. Tests has proven that if you're making an application that uploads a set of files to an ftp server, you will get a noticable gain in speed if you're using multiple connections and this option will be then be very useful.
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-02-02- Craig A West brought us: libcurl now defaults to do CONNECT with HTTPDaniel Stenberg
version 1.1 instead of 1.0 like before. This change also introduces the new proxy type for libcurl called 'CURLPROXY_HTTP_1_0' that then allows apps to switch (back) to CONNECT 1.0 requests. The curl tool also got a --proxy1.0 option that works exactly like --proxy but sets CURLPROXY_HTTP_1_0. I updated all test cases cases that use CONNECT and I tried to do some using --proxy1.0 and some updated to do CONNECT 1.1 to get both versions run.
2009-01-30Fixed --disable-proxy for FTP and SOCKS. Thanks to Daniel Egger for reportingDan Fandrich
the problem.
2009-01-21Fixed a couple more locale-dependent toupper conversions, mainly forDan Fandrich
clarity. This does fix one problem that causes ;type=i FTP URLs to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is used (test case 561) Added tests 561 and 1092 through 1094 to test various combinations of ;type= and ;mode= URLs that could potentially fail in the Turkish locale.
2009-01-19fix typo in comment that made it confusingDaniel Stenberg
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-12-16Added the use of Watt-32 tcp/ip stack for Win32 targets.Gisle Vanem
2008-12-09- Ken Hirsch simplified how libcurl does FTPS: now it doesn't assume anyDaniel Stenberg
particular state for the control connection like it did before for implicit FTPS (libcurl assumed such control connections to be encrypted while some FTPS servers such as FileZilla assumes such connections to be clear mode). Use the CURLOPT_USE_SSL option to set your desired level.
2008-12-08- Fred Machado posted about a weird FTP problem on the curl-users list and whenDaniel Stenberg
researching it, it turned out he got a 550 response back from a SIZE command and then I fell over the text in RFC3659 that says: The presence of the 550 error response to a SIZE command MUST NOT be taken by the client as an indication that the file cannot be transferred in the current MODE and TYPE. In other words: the change I did on September 30th 2008 and that has been included in the last two releases were a regression and a bad idea. We MUST NOT take a 550 response from SIZE as a hint that the file doesn't exist.
2008-11-06Merged existing IPv4 and IPv6 Curl_ip2addr functions into a single oneYang Tse
which now also takes a protocol address family argument.
2008-10-30remove bogus whitespaceYang Tse
2008-10-30These two variables are now Curl_addrinfo pointersYang Tse
2008-10-24fix compiler warningYang Tse
2008-10-23Created Curl_raw_nequal() which does a C-locale string case comparison.Dan Fandrich
Changed checkprefix() to use it and those instances of strnequal() that compare host names or other protocol strings that are defined to be independent of case in the C locale. This should fix a few more Turkish locale problems.
2008-10-22Changed some arrays of char* to arrays of char[] to reduce data size andDan Fandrich
run-time relocations.
2008-10-10fix compiler warningYang Tse
2008-10-09Fixed the --interface option to work with IPv6 connections on glibcDan Fandrich
systems supporting getifaddrs(). Also fixed a problem where an IPv6 address could be chosen instead of an IPv4 one for --interface when it involved a name lookup.
2008-10-08Added const to some pointer variablesDan Fandrich
2008-09-30- The libcurl FTP code now returns CURLE_REMOTE_FILE_NOT_FOUND error when SIZEDaniel Stenberg
gets a 550 response back for the cases where a download (or NOBODY) is wanted. It still allows a 550 as response if the SIZE is used as part of an upload process (like if resuming an upload is requested and the file isn't there before the upload). I also modified the FTP test server and a few test cases accordingly to match this modified behavior.
2008-09-29- Daniel Egger provided a patch that allows you to disable proxy support inDaniel Stenberg
libcurl to somewhat reduce the size of the binary. Run configure --disable-proxy.
2008-09-24ntoa() and inet_ntoa_r() no longer usedYang Tse
2008-09-06remove unnecessary typecasting of malloc()Yang Tse
2008-09-06remove unnecessary typecasting of calloc()Yang Tse
2008-09-02Fixed an out of memory problem that caused torture test failures in testsDan Fandrich
706 and 707.
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-11Fixed a boundary condition error in ftp_readresp() whereby a non-terminalDan Fandrich
line of a multiline FTP response whose last byte landed exactly at the end of the BUFSIZE-length buffer would be treated as the terminal response line. The following response code read in would then actually be the end of the previous response line, and all responses from then on would correspond to the wrong command. Test case 1062 verifies this. Stop closing a never-opened ftp socket.