1
0
mirror of https://github.com/moparisthebest/curl synced 2024-10-31 15:45:12 -04:00
Commit Graph

318 Commits

Author SHA1 Message Date
Daniel Stenberg
27d509cfe9 Minor adjustment needed for the new date parser to succeed. ifdef'ed out
for now.
2004-09-11 19:19:59 +00:00
Daniel Stenberg
df59ca1a45 include the server response in the error message when an FTP server gives
back a 530 after the password is provided, as it isn't necessary because of a
bad user name or password.
2004-08-11 08:39:48 +00:00
Daniel Stenberg
9dbd6659dc more typecasts to please picky compilers 2004-08-10 06:41:13 +00:00
Daniel Stenberg
4c17ba4fc0 make sure the 3rd argument passed to bind() is a socklen_t 2004-07-04 21:48:54 +00:00
Daniel Stenberg
31c332af93 typecast the conversion from long to int to prevent picky compiler warnings 2004-07-04 21:35:12 +00:00
Daniel Stenberg
f05d47ddd6 variable type cleanup to fix picky compiler warnings 2004-07-01 07:43:20 +00:00
Daniel Stenberg
8efa6f407d I think 1024 bytes is enough for even most ipv6 addresses :-) 2004-06-30 12:04:37 +00:00
Daniel Stenberg
feb2dd2835 Replaced all uses of sprintf() with the safer snprintf(). It is just a
precaution to prevent mistakes to lead to buffer overflows.
2004-06-24 11:54:11 +00:00
Daniel Stenberg
c39858aac0 Source cleanups. The major one being that we now _always_ use a Curl_addrinfo
linked list for name resolved data, even on hosts/systems with only IPv4
stacks as this simplifies a lot of code.
2004-06-24 07:43:48 +00:00
Daniel Stenberg
90037b85d1 Alexander Krasnostavsky's fix to make libcurl build fine with configure
--disable-http, which thus builds a libcurl without HTTP support.
2004-06-09 08:23:55 +00:00
Daniel Stenberg
ea81dd9e2e Alexander Krasnostavsky's FTP third party transfer (proxy) support 2004-06-03 11:41:05 +00:00
Daniel Stenberg
a8827b1ed6 Gisle made ftp_mkd static 2004-06-02 11:34:53 +00:00
Daniel Stenberg
2c43d64302 Added a new 'bit' in the connect struct named 'tunnel_proxy' that is set
if a connection is tunneled through a proxy. A tunnel is done with CONNECT,
either when using HTTPS or FTPS, or if explicitly enabled by the app.
2004-05-26 08:54:36 +00:00
Daniel Stenberg
d60c22572b Curl_done() and the protocol-specific conn->curl_done() functions now all
take a CURLcode as a second argument, that is non-zero when Curl_done()
is called after an error was returned from Curl_do() (or similar).
2004-05-12 12:06:39 +00:00
Daniel Stenberg
bbafb2eb27 curl_global_init_mem() allows the memory functions to be replaced.
memory.h is included everywhere for this.
2004-05-11 11:30:23 +00:00
Daniel Stenberg
4b9f8e766d Made host name and proxy name get stored in a 'struct hostname' and set
all things up to work with encoded host names internally, as well as keeping
'display names' to show in debug messages. IDN resolves work for me now using
ipv6, ipv4 and ares resolving. Even cookies on IDN sites seem to do right.
2004-04-27 13:56:23 +00:00
Daniel Stenberg
245e3122df Made defines instead of plain numbers for the Curl_resolv() return code to
make the code easier to read
2004-04-26 14:18:00 +00:00
Daniel Stenberg
1d3f76df71 If only a partial file was transfered, we consider that a fatal problem so
we won't try to QUIT the control connection and risk "hanging" waiting for
a response. Test case 161 verifies this. The quit-sending function was
also made static.
2004-04-22 13:09:00 +00:00
Daniel Stenberg
3233322622 increase the headerbytecount for incoming "headers" 2004-04-21 08:47:57 +00:00
Daniel Stenberg
b7a7600465 Cleaned up hostname/name/gname and path/ppath confusion. Removed the fixed-
length limit of the hostname part of the URL.
2004-04-20 07:53:24 +00:00
Daniel Stenberg
592522ceaf ftp->dirs[] is no longer terminated with a zero entry but ftp->dirdepth
should be used
2004-04-15 10:43:40 +00:00
Daniel Stenberg
4f84e6d9e2 removed the fixed dir depth limit in the FTP code 2004-04-15 07:52:39 +00:00
Daniel Stenberg
cf1f46e1ca renamed the strtoofft() macro to curlx_strtoofft() to adjust to the curlx_*
concept, and added lib/README.curlx to explain details about it
2004-04-07 07:30:40 +00:00
Daniel Stenberg
8ed44e8dfb New authentication code added, particularly noticable when doing POST or PUT
with Digest or NTLM. libcurl will now use HEAD to negotiate the authentication
and when done perform the requested POST.
2004-04-06 15:14:10 +00:00
Daniel Stenberg
5804c995e1 Use the new HAVE_NI_WITHSCOPEID define instead of merely checking for the
existance of NI_WITHSCOPEID since some platforms have that define but still
can't function with it set.
2004-03-31 21:33:52 +00:00
Daniel Stenberg
ce446dbdc2 Moved the NI_WITHSCOPEID magic #ifdef to the top of the file and made sure
we use the NIFLAGS properly on both places in the code that use getnameinfo().
2004-03-31 10:59:48 +00:00
Daniel Stenberg
762dcf0780 include the strerror.h file without curl_ prefix 2004-03-25 13:42:23 +00:00
Daniel Stenberg
b60d6404d8 Gisle Vanem's fix to replace the bad use of strerror(). This introduces
Curl_strerror() that attempts to be thread-safe _and_ works on Windows too!
2004-03-24 22:45:37 +00:00
Daniel Stenberg
5b55f9ecb3 Günter Knauf's NetWare changes. 2004-03-17 12:46:42 +00:00
Daniel Stenberg
e545e33d5f Gisle Vanem's fixes to use CURL_SOCKET_BAD more instead of -1 for sockets. 2004-03-11 13:13:35 +00:00
Daniel Stenberg
0d1fc73f21 Use more curl_off_t variables when doing the progress meter calculations and
argument passing and try to convert to double only when providing data to the
external world.
2004-03-10 16:20:33 +00:00
Daniel Stenberg
85838a8966 turn niflags into a define named NIFLAGS 2004-03-10 15:24:56 +00:00
Daniel Stenberg
ce5805a955 Use curl_socket_t instead of int for holding sockets. The typedefs and
defines are in setup.h.
2004-03-09 22:52:50 +00:00
Daniel Stenberg
ef0a2c714b clearly tell that these are ftp response timeouts 2004-03-05 09:37:48 +00:00
Daniel Stenberg
5e7f1a0eaf more variable type cleanups 2004-03-03 13:24:14 +00:00
Daniel Stenberg
eb9383d49b our timeout values are longs while 'tv_sec' is int 2004-03-03 13:17:44 +00:00
Daniel Stenberg
353f764119 Yet another curl_off_t printf format attempt, we now exclude the %-letter from
FORMAT_OFF_T to allow additional options to get specified, like with '"%5"
FORMAT_OFF_T'.
2004-03-02 09:31:18 +00:00
Daniel Stenberg
7ab3b5b3bb use FORMAT_OFF_T instead of CURL_FORMAT_OFF_T to reduce the complexity of
having to redef that name
2004-03-02 07:25:39 +00:00
Daniel Stenberg
cb72a80fe0 Use CURL_FORMAT_OFF_T for printf()inf curl_off_t variables. 2004-03-01 16:28:00 +00:00
Daniel Stenberg
4dfc0a78e7 Only attempt to send the FTP QUIT command if we actually have a FTP struct. 2004-03-01 07:59:25 +00:00
Daniel Stenberg
77268e0649 Joe Halpin made the FTP code send 'QUIT' on the control connection before
it disconnects the TCP connection, like a good ftp client should!
2004-02-27 07:08:37 +00:00
Daniel Stenberg
d571064b65 Clear up int/long/size_t/ssize_t usage a bit 2004-02-26 13:40:43 +00:00
Daniel Stenberg
1b26fe39f9 Tor Arntsen's fix for the bad (64bit wise) typecast when using gmtime() 2004-02-13 06:59:49 +00:00
Daniel Stenberg
011929cf4d Tor Arntsen's patch for working around a notorious bug in the AIX5
getaddrinfo() implementation.
2004-02-09 07:52:36 +00:00
Daniel Stenberg
6587ff440a use the timeout options when waiting for the server to connect when using
PORT
Provide better error messages to allow debugging if one if the ipv6-related
name functions fail in the ftp_use_port() function. This might help us
diagnose the problems on AIX. Also make sure getaddrinfo() uses NULL and
not "0" for the service argument.
2004-02-05 09:26:01 +00:00
Daniel Stenberg
556b68f44e the unused quit-function didn't pass a correct variable type to the
response reading function
2004-02-03 09:52:32 +00:00
Daniel Stenberg
4d17d6876e Dan Fandrich's cleanup patch to make pedantic compiler options cause less
warnings. Minor edits by me.
2004-01-29 13:56:45 +00:00
Daniel Stenberg
b791e158f0 use curl_off_t instead of off_t! 2004-01-22 12:45:50 +00:00
Daniel Stenberg
5e2fcc1f74 use the proper timecond defines, not the obsolete ones I've removed! ;-)
The initial QUIT-sending code is added, but not yet used due to the issues
previously mentioned on the mailing list.
2004-01-21 08:50:08 +00:00
Daniel Stenberg
053f6c85ef updated year in the copyright string 2004-01-07 09:19:33 +00:00
Daniel Stenberg
b60e0fa97e David J Meyer's large file support. 2004-01-05 22:29:29 +00:00
Daniel Stenberg
ee337309cf better human error message when a FTP response can't be read 2003-12-08 13:06:08 +00:00
Daniel Stenberg
8ccc1148d9 my contentlength adjustment broke the ftp download range stuff, this makes
it work again
2003-12-03 08:26:31 +00:00
Daniel Stenberg
1b99d33b59 fix compiler warnings 2003-12-02 13:40:12 +00:00
Daniel Stenberg
800052dc50 use the HAVE_KRB4 define instead of just KRB4 2003-12-02 13:27:29 +00:00
Daniel Stenberg
2c22feced2 fixes from Gisle Vanem to try 'AUTH SSL' before 'AUTH TLS', edited by me 2003-12-02 13:21:53 +00:00
Daniel Stenberg
cd653f1be9 FTPS now works with active ftp and uploads too. 2003-12-01 10:14:39 +00:00
Daniel Stenberg
d5d55a856e adjusted code to the new socket fields in the sessionhandle struct 2003-11-24 09:04:09 +00:00
Daniel Stenberg
1e98727c55 FTPS support added as RFC2228 and the murray-ftp-auth-ssl draft describe it 2003-11-24 07:15:37 +00:00
Daniel Stenberg
edce444551 If a partial file has been read or written, force a closure the existing
connection to avoid re-use of it, since we cannot know in what state it is.
2003-11-19 14:36:42 +00:00
Daniel Stenberg
17a834bc63 After Sébastien Willemijns' bug report, we now check the separators properly
in the 229-reply servers respond on a EPSV command and bail out better if
the reply string is not valid RFC2428-compliant.
2003-11-10 08:12:53 +00:00
Daniel Stenberg
a7aacac5e8 assume that MDTM returns the timestamp as UTC 2003-10-31 21:36:43 +00:00
Daniel Stenberg
46accd62d1 when getting headers only, stop pretending the reported time is GMT, as it
isn't. In fact, it might be, but we have no idea.
2003-10-30 09:06:24 +00:00
Daniel Stenberg
656d4b4c20 if malloc fails, we must bail out nicely 2003-10-24 12:58:59 +00:00
Daniel Stenberg
65dab79ca5 gcc -Wshadow complaints fixed 2003-10-18 20:14:33 +00:00
Daniel Stenberg
ce5db9a86e Dominick Meglio implemented CURLOPT_MAXFILESIZE and --max-filesize. 2003-10-17 13:11:00 +00:00
Daniel Stenberg
9e3f54431d made the code deal with empty name and password 2003-10-17 09:26:28 +00:00
Daniel Stenberg
749f5387c1 Gisle Vanem's IPv6-on-Windows patch applied! 2003-10-14 12:00:45 +00:00
Daniel Stenberg
45ef092cc2 Jon Turner mentioned this bug fix to correct how libcurl deals with paths
after a failed transfer.
2003-10-04 15:25:02 +00:00
Daniel Stenberg
cc497fd153 don't use a blank proxy 2003-09-11 22:05:23 +00:00
Daniel Stenberg
f2d422235b Early Ehlinger's CURLOPT_FTP_RESPONSE_TIMEOUT patch applied. 2003-09-03 22:02:40 +00:00
Daniel Stenberg
2ad0a7d20f minor fix to make better bail-out check 2003-09-03 21:44:59 +00:00
Daniel Stenberg
4459d3b434 have cwd_and_mkd prefixed with ftp_ to make it appear as a ftp-only
function
2003-08-22 12:35:18 +00:00
Daniel Stenberg
d00e4a377b store the FTP response code in the httpcode variable 2003-08-20 15:41:45 +00:00
Daniel Stenberg
5dadbd094e don't claim the PASV connect is connected unless it *really* is! 2003-08-10 17:11:41 +00:00
Daniel Stenberg
7954eee639 re-arranged the cwd/mkd stuff a bit 2003-08-08 09:55:16 +00:00
Daniel Stenberg
f9f1f0e316 Early Ehlinger's CURLOPT_FTP_CREATE_MISSING_DIRS patch was applied 2003-08-08 09:13:19 +00:00
Daniel Stenberg
b73612392d ares awareness/usage/support added. If configure --enable-ares is used, we
build libcurl to use ares for asynch name resolves.
2003-08-05 14:40:59 +00:00
Daniel Stenberg
1e7e53c87e clean up the dir tree hierarchy in *_done() to make persistant connection
FTP use the correct directories!

Reported in bug report #783116
2003-08-05 13:04:10 +00:00
Daniel Stenberg
e3b4dd08ff Daniel Noguerol made the ftp code output "Accept-Ranges: bytes" in similar
style like other faked HTTP headers when NOBODY and HEADER are used.
2003-07-30 07:51:33 +00:00
Daniel Stenberg
1c35cbcc07 Reverted the 'filetime' struct field back to a 'long' as time_t is sometimes
unsigned and we want this to be able to hold -1 for illegal/unset values.
2003-07-30 07:22:28 +00:00
Daniel Stenberg
d9246ff24d François Pons brought a patch that once again made curl deal with ftp and
"double slash" as indicating the root directory. In the RFC1738-fix of April
30, that ability was removed (since it is not the "right" way).
2003-07-28 08:50:02 +00:00
Daniel Stenberg
56014e74a0 krb4-fixes for the moved user+password fields within the structs 2003-07-21 09:19:48 +00:00
Daniel Stenberg
5e133e2dff David Gardner pointed out in bug report 770755 that using the FTP command CWD
with a blank argument is a bad idea. Now skip blanks.
2003-07-20 00:18:11 +00:00
Daniel Stenberg
52b631fade Access the user and passwd fields from the connectdata struct now instead
of the sessionhandle struct, as that was not good.
2003-07-19 23:56:33 +00:00
Daniel Stenberg
81d403e207 one typecast less for the localtime(), use CURLDEBUG instead of MALLOCDEBUG 2003-06-26 06:52:48 +00:00
Daniel Stenberg
e2f4656a86 Ricardo Cadime found a socket leak when listing directories without
contents. Test cases 144 and 145 were added to verify the fix.

Now we deal with return code 450 properly and other codes also do proper
cleanup.
2003-05-23 11:14:09 +00:00
Daniel Stenberg
22569681bc George Comninos provided a fix that calls the progress meter when waiting
for FTP command responses take >1 second.
2003-05-14 06:31:00 +00:00
Daniel Stenberg
a51258b6bb before using if2ip(), check if the address is an ip address and skip it if
it is.
2003-05-13 12:11:31 +00:00
Daniel Stenberg
9ead79c9d4 when we have accepted the server's connection in a PORT sequence, we set
the new socket to non-blocking
2003-05-12 12:37:35 +00:00
Daniel Stenberg
94a157d0b0 support for CURLOPT_FTP_USE_EPRT added 2003-05-09 07:39:29 +00:00
Daniel Stenberg
3ef06d7efe when making up the list of path parts, save the last entry pointing to NULL
as otherwise we'll go nuts
2003-04-30 20:04:17 +00:00
Daniel Stenberg
bf2b3dbf3e David Balazic's patch to make the FTP operations "do right" according to
RFC1738, which means it'll use one CWD for each pathpart.
2003-04-30 16:59:42 +00:00
Daniel Stenberg
028e9cc56f According to RFC959, CWD is supposed to return 250 on success, but
there seem to be non-compliant FTP servers out there that return 200,
 so we accept any '2xy' response now.
2003-04-11 08:10:54 +00:00
Daniel Stenberg
a4ffcfd4d5 timecond support added
made the Last-Modified (faked) header look correct using GMT always
2003-04-09 11:56:31 +00:00
Daniel Stenberg
3cba274ba6 kill a compiler warning on cygwin 2003-04-03 14:16:15 +00:00
Daniel Stenberg
853e240e1d Use ssize_t instead of 'int' to make the 64 bit sparc compiler happier.
Fix by Richard Gorton.
2003-03-11 18:58:21 +00:00
Daniel Stenberg
52ebf50607 It appears that there are FTP-servers that return size 0 for files
when SIZE is used on the file while being in BINARY mode. To work
around that (stupid) behavior, we attempt to parse the RETR response
even if the SIZE returned size zero.

Debugging help from Salvatore Sorrentino on February 26, 2003.
2003-02-27 12:50:54 +00:00
Jean-Philippe Barette-LaPierre
beb13a1d3e added the sharing of DNS cache 2003-02-04 23:48:46 +00:00
Daniel Stenberg
89934239d7 reset conn->size to -1 on the ftp-do function to make it not go on to
ftp_done() with the previous transfer's value, as Dave Halbakken found out.
He also verified this fixed corrected the problem.
2003-01-29 10:54:39 +00:00