Commit Graph

2830 Commits

Author SHA1 Message Date
Daniel Stenberg c904b6b5bf Toshiyuki Maezawa reported that when doing a POST with a read callback,
libcurl didn't properly send an Expect: 100-continue header. It does now.
2005-04-18 17:14:58 +00:00
Daniel Stenberg e9d068b913 oops, only negative numbers are errors 2005-04-13 21:17:05 +00:00
Daniel Stenberg 316adac511 don't bail out just because the ca file has a problem, it might be OK 2005-04-13 12:38:01 +00:00
Daniel Stenberg 4e26b2a65b fix compiler warning 2005-04-13 06:52:03 +00:00
Daniel Stenberg c13a3d7b84 Provides an unconditional strlcat() proto even if strlcat() was found by
configure. An attempt to fix warnings when we build and the strlcat() function
is provided by one if the libs (gss or krb4) since then we have no protos
for it in a system header.
2005-04-12 07:56:57 +00:00
Daniel Stenberg f09e479fd6 Blah, revert my removal of the extra check since the problem is there for real.
Archived thread of the help-gnutls mailing list regarding this problem:

http://lists.gnu.org/archive/html/help-gnutls/2005-04/msg00000.html

(and I _am_ sorry for my confused behaviour on this problem.)
2005-04-09 22:33:14 +00:00
Daniel Stenberg 80fe93bc33 OK, I must've been halucinating or something because I no longer see the
bug I thought I saw before when I changed this...!
2005-04-09 21:38:14 +00:00
Daniel Stenberg fb3c85ab2f fixed the 304 response-with-content-length problem reported by Cory Nelson 2005-04-08 16:59:13 +00:00
Daniel Stenberg 2fc70e2c5d re-arrange some code to prevent warnings on unreachable code 2005-04-08 09:25:48 +00:00
Marty Kuhrt 37a547842b cast the call to Curl_inet_ntop for DECC compiler squawk 2005-04-08 05:01:40 +00:00
Daniel Stenberg b9f1d43921 Unfortunately, if a ca file name is set the function fails for whatever reason
(missing file, bad file, etc), gnutls will no longer handshake properly but it
just loops forever. Therefore, we must return error if we get an error when
setting the CA cert file name. This is not the same behaviour as with OpenSSL.

Question/report posted to the help-gnutls mailing list, April 8 2005.
2005-04-07 22:47:43 +00:00
Daniel Stenberg bec6423c02 one down 2005-04-07 22:14:22 +00:00
Daniel Stenberg 14d9b56937 cut 'n paste error 2005-04-07 21:12:09 +00:00
Daniel Stenberg 1c3766eb46 GnuTLS updates 2005-04-07 21:10:31 +00:00
Daniel Stenberg 2085f133d6 added new files 2005-04-07 20:56:04 +00:00
Daniel Stenberg 2a045dfceb fixed to build after the GnuTLS fixes 2005-04-07 20:36:48 +00:00
Daniel Stenberg 6e61939382 GnuTLS support added. There's now a "generic" SSL layer that we use all over
internally, with code provided by sslgen.c. All SSL-layer-specific code is
then written in ssluse.c (for OpenSSL) and gtls.c (for GnuTLS).

As far as possible, internals should not need to know what SSL layer that is
in use. Building with GnuTLS currently makes two test cases fail.

TODO.gnutls contains a few known outstanding issues for the GnuTLS support.

GnuTLS support is enabled with configure --with-gnutls
2005-04-07 15:27:13 +00:00
Daniel Stenberg 758d9fe852 too late hacking error 2005-04-05 21:14:59 +00:00
Daniel Stenberg ee44eec3e1 Christophe Legry's fix to grok time-conditoned uploads 2005-04-05 20:59:12 +00:00
Daniel Stenberg 9b3c2b6ae2 kill warnings 2005-04-04 21:23:04 +00:00
Daniel Stenberg 833b6df969 Marcelo Juchem's improvements 2005-04-04 13:21:03 +00:00
Gisle Vanem 0b45431139 hostthre.c: destroy_thread_data() made public. Called
from url.c: Curl_disconnect().
2005-04-04 12:30:03 +00:00
Daniel Stenberg 74816fed6c Hardeep Singh reported a problem doing HTTP POST with Digest. (It was actually
also affecting NTLM and Negotiate.) It turned out that if the server responded
with 100 Continue before the initial 401 response, libcurl didn't take care of
the response properly. Test case 245 and 246 added to verify this.
2005-04-03 22:46:25 +00:00
Daniel Stenberg f96fadc074 fixed bad comment, pointed out by Marcelo Juchem 2005-03-31 20:34:24 +00:00
Daniel Stenberg ab4086bc24 Updated the copyright year since changes have been this year. 2005-03-31 07:02:02 +00:00
Daniel Stenberg 158588640a Don't close the connection if we're in a known negotiation mode and we won't
send any data anyway. Probably the bug Tom Moers noticed.
2005-03-29 12:28:25 +00:00
Daniel Stenberg 371ef80dc3 When doing FTP-SSL, advance to the next state properly when the response to
AUTH has been received successfully.
2005-03-29 11:43:02 +00:00
Daniel Stenberg 84b4e9ff7c Fixed the FTP response reader function to properly deal with responses split
up in several chunks when read.
2005-03-29 11:35:25 +00:00
Daniel Stenberg 8a076d1dba Based on Augustus Saunders' comments and findings, the HTTP output auth
function was fixed to use the proper proxy authentication when multiple ones
were added as accepted. test 239 and test 243 were added to repeat the
problems and verify the fixes.
2005-03-28 22:19:31 +00:00
Dan Fandrich 6c6dda1b74 Fixed typo. 2005-03-22 01:24:27 +00:00
Daniel Stenberg 8817779f23 Modified the VALID_SOCK() macro to become VERIFY_SOCK() instead. It is slighly
more involved, but should hopefully not generate any compiler warnings on
win32 systems (that can't check the socket based on the numeric).
2005-03-21 22:34:07 +00:00
Daniel Stenberg c85a77e0b1 removed a (fairly useless) debug output just to compile without warning 2005-03-20 12:46:11 +00:00
Daniel Stenberg 38f07ce0fb fix compiler warning 2005-03-19 00:44:55 +00:00
Daniel Stenberg 5840c8cb70 fix by Kyrre Kristiansen 2005-03-18 10:16:49 +00:00
Dan Fandrich 38f797ccd6 Use the proper macro to do uClibc detection. 2005-03-17 20:32:59 +00:00
Daniel Stenberg 553c5a7501 include inet_pton.h 2005-03-17 19:12:15 +00:00
Daniel Stenberg 8b80ac2877 use Curl_inet_pton(), not inet_pton(). 2005-03-17 07:40:15 +00:00
Dan Fandrich f5cdac38bd Removed references to config-vms.h from the makefiles. 2005-03-16 23:09:39 +00:00
Dan Fandrich 760565dcad Removed old VMS config files (on behalf of Marty Kuhrt). The VMS build
scripts use the version in packages/vms/
2005-03-16 22:27:05 +00:00
Daniel Stenberg 61133545f6 - Tru64 and some IRIX boxes seem to not like test 237 as it is. Their
inet_addr() functions seems to use &255 on all numericals in a ipv4 dotted
  address which makes a different failure... Now I've modified the ipv4
  resolve code to use inet_pton() instead in an attempt to make these systems
  better detect this as a bad IP address rather than creating a toally bogus
  address that is then passed on and used.
2005-03-16 22:01:39 +00:00
Dan Fandrich bf87d13f5b Fixed some compiler warnings I should have noticed before. 2005-03-16 02:25:12 +00:00
Dan Fandrich efaf688650 Fixed ftp support with uClibc due to differing inet_ntoa_r() behaviour. 2005-03-15 21:00:46 +00:00
Daniel Stenberg a357f77c4c nonsense change for(;;) => while(1) just to prevent gcc from warning on
never executed code when -Wunreachable-code is used
2005-03-15 07:48:45 +00:00
Daniel Stenberg d5bdd2b2f9 prevent compiler warning 2005-03-15 07:47:59 +00:00
Daniel Stenberg ec4e653c6f hushing up more warnings 2005-03-14 15:51:10 +00:00
Daniel Stenberg 3916d1e6cb silence compiler warnings for mingw win32 builds --enable-debug 2005-03-14 15:43:23 +00:00
Gisle Vanem 76c24a0d82 Avoid "unused variable" warnings. 2005-03-14 09:37:08 +00:00
Daniel Stenberg de8947f92f security.h is removed 2005-03-14 07:46:42 +00:00
Daniel Stenberg 34865ffb4a include security.h with lowercase s to work on cross-compiled mingw 2005-03-14 00:01:30 +00:00
Daniel Stenberg 62970da675 Removed security.h since it shadows an include file mingw needs when building
for SSPI support. The contents of the file has been moved into the krb4.h file.
2005-03-14 00:00:45 +00:00
Gisle Vanem 88a4dc2795 Swap <security.h> and <sspi.h> (needed for MingW). 2005-03-12 17:31:15 +00:00
Daniel Stenberg 84bc23b92f curl_version_info() returns the feature bit CURL_VERSION_SSPI 2005-03-11 15:10:36 +00:00
Dan Fandrich fb9ae9d0e2 Fixed some compiler warnings. 2005-03-11 05:49:04 +00:00
Dan Fandrich 205f8b266c Fixed LDAP library file name bug (KNOWN_BUGS #1). configure now auto-detects
the correct dynamic library names by default, and provides override switches
--with-ldap-lib, --with-lber-lib and --without-lber-lib.  Added
CURL_DISABLE_LDAP to platform-specific config files to disable LDAP
support on those platforms that probably don't have dynamic OpenLDAP
libraries available to avoid compile errors.
2005-03-11 05:28:07 +00:00
Daniel Stenberg d1d35ba85f Christopher R. Palmer made it possible to build libcurl with the
USE_WINDOWS_SSPI on Windows, and then libcurl will be built to use the native
way to do NTLM. SSPI also allows libcurl to pass on the current user and its
password in the request.
2005-03-10 23:15:29 +00:00
Daniel Stenberg 0472629222 As reported by 'nodak sodak' we should check for a NULL pointer before
referencing the proxy name pointer.
2005-03-09 22:13:52 +00:00
Daniel Stenberg b7ffc6bb45 remove old printf() debug leftover 2005-03-08 22:21:59 +00:00
Daniel Stenberg 8a96aec567 mktime() returns a time_t. time_t is often 32 bits, even on many architectures
that feature 64 bit 'long'.

Some systems have 64 bit time_t and deal with years beyond 2038. However, even
some of the systems with 64 bit time_t returns -1 for dates beyond 03:14:07
UTC, January 19, 2038. (Such as AIX 5100-06)
2005-03-08 16:31:56 +00:00
Daniel Stenberg 702664e959 Dominick Meglio reported that using CURLOPT_FILETIME when transferring a FTP
file got a Last-Modified: header written to the data stream, corrupting the
actual data. This was because some conditions from the previous FTP code was
not properly brought into the new FTP code. I fixed and I added test case 520
to verify. (This bug was introduced in 7.13.1)
2005-03-08 08:09:14 +00:00
Daniel Stenberg aa47ac4c06 Added test case 235 that makes a resumed upload of a file that isn't present
on the remote side. This then converts the operation to an ordinary STOR
upload. This was requested/pointed out by Ignacio Vazquez-Abrams.

It also proved (and I fixed) a bug in the newly rewritten ftp code (and
present in the 7.13.1 release) when trying to resume an upload and the servers
returns an error to the SIZE command. libcurl then loops and sends SIZE
commands infinitely.
2005-03-04 23:52:06 +00:00
Dan Fandrich b01151e81c Reduced the length of data read from the random entropy file. 2005-03-04 22:36:56 +00:00
Dan Fandrich 67bd6f9ccd Don't try to read the whole of the random file because when /dev/urandom is
used, it slows initialization too much reading an infinitely long file!
2005-03-04 20:10:29 +00:00
Daniel Stenberg 6f752c64bc Dave Dribin made it possible to set CURLOPT_COOKIEFILE to "" to activate
the cookie "engine" without having to provide an empty or non-existing file.
2005-03-04 00:26:50 +00:00
Daniel Stenberg ccb7950c4c killed trailing whitespace 2005-03-04 00:24:52 +00:00
Daniel Stenberg 750e771376 killed trailing whitespace 2005-03-04 00:14:45 +00:00
Dan Fandrich 0ddab51ad8 Fix for a base64 decode heap buffer overflow vulnerability. 2005-02-28 23:54:17 +00:00
Dan Fandrich 9798432f56 Fixed some compiler warnings. Fixed a low incidence memory leak in the test server. 2005-02-24 18:54:23 +00:00
Daniel Stenberg f8b4ba80e0 krb4 fixed 2005-02-22 12:20:30 +00:00
Daniel Stenberg 527f70e540 Curl_base64_decode() now returns an allocated buffer 2005-02-22 12:10:30 +00:00
Daniel Stenberg 19f66c7575 Thanks for the notification iDEFENCE. We are the "initial vendor" and we sure
got no notification, no mail, no nothing.

You didn't even bother to mail us when you went public with this. Cool.

NTLM buffer overflow fix, as reported here:

http://www.securityfocus.com/archive/1/391042
2005-02-22 07:44:14 +00:00
Daniel Stenberg 5ba188ab2d Ralph Mitchell reported a flaw when you used a proxy with auth, and you
requested data from a host and then followed a redirect to another
host. libcurl then didn't use the proxy-auth properly in the second request,
due to the host-only check for original host name wrongly being extended to
the proxy auth as well. Added test case 233 to verify the flaw and that the
fix removed the problem.
2005-02-18 23:53:07 +00:00
Daniel Stenberg 176981b529 close the socket properly when returning error due to failing localbind
Bug report #1124588 by David
2005-02-17 14:45:03 +00:00
Daniel Stenberg ac022b2e30 Christopher R. Palmer reported a problem with HTTP-POSTing using "anyauth"
that picks NTLM. Thanks to David Byron letting me test NTLM against his
servers, I could quickly repeat and fix the problem. It turned out to be:

When libcurl POSTs without knowing/using an authentication and it gets back a
list of types from which it picks NTLM, it needs to either continue sending
its data if it keeps the connection alive, or not send the data but close the
connection. Then do the first step in the NTLM auth. libcurl didn't send the
data nor close the connection but simply read the response-body and then sent
the first negotiation step. Which then failed miserably of course. The fixed
version forces a connection if there is more than 2000 bytes left to send.
2005-02-16 14:31:23 +00:00
Daniel Stenberg 0a3065a2f2 Rename Curl_pretransfersec() to *_second_connect() since it does not just
do pretransfer stuff like Curl_pretransfer().
2005-02-14 09:30:40 +00:00
Daniel Stenberg b98faaa8c0 Fixed bad krb4 code. It always tried to use krb4 if built enabled. 2005-02-11 22:50:57 +00:00
Daniel Stenberg e7cefd684b Removed all uses of strftime() since it uses the localised version of the
week day names and month names and servers don't like that.
2005-02-11 00:03:49 +00:00
Daniel Stenberg 17d61e4f29 typecast assign to ftpport from int to prevent warnings 2005-02-10 07:45:26 +00:00
Daniel Stenberg 446b9467da init fix for non-SSL builds 2005-02-10 07:45:08 +00:00
Daniel Stenberg 8c83422fe2 David Byron identified the lack of SSL_pending() use, and this is my take
at fixing this issue.
2005-02-09 23:09:12 +00:00
Daniel Stenberg 61a1e3cd01 better error checking and SSL init by David Byron 2005-02-09 23:04:51 +00:00
Daniel Stenberg 89cac6f25c prevent a compiler warning 2005-02-09 22:47:57 +00:00
Gisle Vanem 32d76a5b57 Set 'bits.close' in case of malloc fail.
Don't free 'lud_dn' twice in case curl_unescape()
fails.
2005-02-09 14:28:35 +00:00
Gisle Vanem f5394cccb1 Use CURL_SOCKET_BAD. 2005-02-09 14:01:15 +00:00
Gisle Vanem 64dd9c7656 Handle CURLE_LOGIN_DENIED in strerror.c.
For ftp only?
2005-02-09 13:59:40 +00:00
Daniel Stenberg 16ae0c6466 FD_SET can be big macro, use braces 2005-02-09 13:47:35 +00:00
Daniel Stenberg 6a2e21ec8c FTP code turned into state machine. Not completely yet, but a good start.
The tag 'before_ftp_statemachine' was set just before this commit in case
of future need.
2005-02-09 13:06:40 +00:00
Gisle Vanem 120f17ce04 Replace LF with CRLF. Ref RFC-2229, sec 2.3:
"Each command line must be terminated by a CRLF".
2005-02-09 11:50:41 +00:00
Daniel Stenberg 41def21f91 ares_gethostbyname wants a 'ares_host_callback' in the 4th argument 2005-02-08 19:03:27 +00:00
Gisle Vanem d118312922 Curl_addrinfo?_callback() and addrinfo_callback() now returns
CURLE_OK or CURLE_OUT_OF_MEMORY.
Add typecast in hostares.c.
2005-02-08 12:36:13 +00:00
Gisle Vanem 82b93e4945 Don't free too much in freedirs() if realloc() fails. 2005-02-08 12:32:28 +00:00
Daniel Stenberg e36fb1ecda Curl_wait_for_resolv() no longer disconnects on failure, but leaves that
operation to the caller. Disconnecting has the disadvantage that the conn
pointer gets completely invalidated and this is not handled on lots of places
in the code.
2005-02-08 07:36:57 +00:00
Dan Fandrich e4a1788614 Fix for a bug report that compressed files that are exactly 64 KiB long
produce a zlib error.
2005-02-07 19:12:37 +00:00
Gisle Vanem 7b23eff9cf Preserve previous status in Curl_http_done(). 2005-02-06 12:43:40 +00:00
Daniel Stenberg 29350b363b Eric Vergnaud found a use of an uninitialized variable 2005-02-04 23:43:44 +00:00
Daniel Stenberg 83c470a443 David Byron pointed out that this -1 on the buffer size is pointless since
the buffer is already BUFSIZE +1 one big to fit the extra trailing zero. This
change is reported to fix David's weird SSL problem...
2005-02-04 13:42:41 +00:00
Daniel Stenberg 686d767053 if the DO operation returns failure, bail out and close down nicely to
prevent memory leakage
2005-01-30 22:54:06 +00:00
Daniel Stenberg e6034ea299 Use calloc() to save us the memset() call and terminate conn->host.name
properly, to avoid reading uninited variables when using file:// (valgrind)
2005-01-30 12:42:15 +00:00
Daniel Stenberg 9a820d7a98 include "url.h" for the Curl_safefree() proto 2005-01-29 22:38:45 +00:00
Daniel Stenberg 8dbaf534c8 Using the multi interface, and doing a requsted a re-used connection that
gets closed just after the request has been sent failed and did not re-issue
a request on a fresh reconnect like the easy interface did. Now it does!
(define CURL_MULTIEASY, run test case 160)
2005-01-29 22:31:06 +00:00
Daniel Stenberg 91f483c591 Define CURL_MULTIEASY when building this, to use my new curl_easy_perform()
that uses the multi interface to run the request. It is a great testbed for
the multi interface and I believe we shall do it this way for real in the
future when we have a successor to curl_multi_fdset().
2005-01-29 22:26:38 +00:00
Daniel Stenberg c4ff5eb0ca conn->ip_addr MUST NOT be used on re-used connections 2005-01-29 13:07:16 +00:00
Daniel Stenberg 59b45a90cc multi interface: when a request is denied due to "Maximum redirects followed"
libcurl leaked the last Location: URL.
2005-01-29 12:01:20 +00:00
Daniel Stenberg f661475962 Connect failures with the multi interface was often returned as "connect()
timed out" even though the reason was different. Fixed this problem by not
setting this timeout to zero when using multi.
2005-01-28 23:21:24 +00:00
Daniel Stenberg 4551e7ce49 KNOWN_BUGS #17 fixed. A DNS cache entry may not remain locked between two
curl_easy_perform() invokes. It was previously unlocked at disconnect, which
could mean that it remained locked between multiple transfers. The DNS cache
may not live as long as the connection cache does, as they are separate.

To deal with the lack of DNS (host address) data availability in re-used
connections, libcurl now keeps a copy of the IP adress as a string, to be able
to show it even on subsequent requests on the same connection.
2005-01-28 22:14:48 +00:00
Daniel Stenberg 064bc3ecbc Stephen More pointed out that CURLOPT_FTPPORT and the -P option didn't work
when built ipv6-enabled. I've now made a fix for it. Writing test cases for
custom port strings turned too tricky so unfortunately there's none.
2005-01-28 08:26:36 +00:00
Daniel Stenberg 177dbc7be0 Ian Ford asked about support for the FTP command ACCT, and I discovered it is
present in RFC959... so now (lib)curl supports it as well. --ftp-account and
CURLOPT_FTP_ACCOUNT set the account string. (The server may ask for an account
string after PASS have been sent away. The client responds with "ACCT [account
string]".) Added test case 228 and 229 to verify the functionality. Updated
the test FTP server to support ACCT somewhat.
2005-01-25 22:13:12 +00:00
Daniel Stenberg 043d70fcdf Use plain structs and not typedef'ed ones in the hash and linked-list code. 2005-01-25 00:06:29 +00:00
Daniel Stenberg 7e42cb61f7 FTP third transfer support overhaul. See CHANGES for details. 2005-01-21 09:32:32 +00:00
Daniel Stenberg 3050ae57c0 Stephan Bergmann made libcurl return CURLE_URL_MALFORMAT if an FTP URL
contains %0a or %0d in the user, password or CWD parts. (A future fix would
include doing it for %00 as well - see KNOWN_BUGS for details.) Test case 225
and 226 were added to verify this
2005-01-19 21:56:02 +00:00
Gisle Vanem 06ad5be3af Don't copy 'stderr' for Win-CE in IPv6 code. Don't call
GetCurrentProcess() twice; use a local variable.
2005-01-19 10:20:55 +00:00
Daniel Stenberg a0c8b9bc68 Stephan Bergmann pointed out two flaws in libcurl built with HTTP disabled:
1) the proxy environment variables are still read and used to set HTTP proxy

2) you couldn't disable http proxy with CURLOPT_PROXY (since the option was
   disabled)
2005-01-19 09:36:44 +00:00
Daniel Stenberg b1080f7c9a Cody Jones' enhanced version of Samuel Daz Garca's MSVC makefile patch. 2005-01-18 10:17:34 +00:00
Daniel Stenberg e0bea7d541 Alex aka WindEagle pointed out that when doing "curl -v dictionary.com", curl
assumed this used the DICT protocol. While guessing protocols will remain
fuzzy, I've now made sure that the host names must start with "[protocol]."
for them to be a valid guessable name. I also removed "https" as a prefix that
indicates HTTPS, since we hardly ever see any host names using that.
2005-01-16 08:51:52 +00:00
Gisle Vanem f5b8a26d9a errrno can by freak accident become EINTR on DOS or
Windows (unrelated to select). select() can never set errno
to EINTR on Windows.
2005-01-15 09:26:07 +00:00
Daniel Stenberg 4d1f3d3cd0 Added README.hostip 2005-01-14 13:43:29 +00:00
Daniel Stenberg 0e26355348 Inspired by Martijn Koster's patch and example source at
http://www.greenhills.co.uk/mak/gentoo/curl-eintr-bug.c, I now made the
select() and poll() calls properly loop if they return -1 and errno is
EINTR. glibc docs for this is found here:
http://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html

This last link says BSD doesn't have this "effect". Will there be a problem
if we do this unconditionally?
S: ----------------------------------------------------------------------
2005-01-13 21:51:48 +00:00
Gisle Vanem 7c1bba315b Added '-bd' option; target is a DLL.
Added dependencies.
2005-01-12 15:32:26 +00:00
Daniel Stenberg c5b2e85b47 Dan Torop cleaned up a few no longer used variables from David Phillips'
select() overhaul fix.
2005-01-11 20:22:44 +00:00
Daniel Stenberg e3fa7d021e Renamed easy.h and multi.h to easyif.h and multiif.h to make sure they don't
shadow our public headers with the former names.
2005-01-11 15:25:29 +00:00
Gisle Vanem a1813e2b2d ".\lib\easy.h" shadows for <curl/easy.h> in Watcom.
Force including ../include/curl/easy.h.
2005-01-11 14:59:24 +00:00
Gisle Vanem bb9e5565f2 ".\lib\multi.h" shadows for <curl/multi.h> in Watcom.
Force including ../include/curl/multi.h.
2005-01-11 14:32:09 +00:00
Daniel Stenberg 29102befa6 Cyrill Osterwalder posted a detailed analysis about a bug that occurs when
using a custom Host: header and curl fails to send a request on a re-used
persistent connection and thus creates a new connection and resends it. It
then sent two Host: headers. Cyrill's analysis was posted here:
http://curl.haxx.se/mail/archive-2005-01/0022.html
2005-01-11 14:00:45 +00:00
Daniel Stenberg 9d1145598a Bruce Mitchener identified (bug report #1099640) the never-ending SOCKS5
problem with the version byte and the check for bad versions. Bruce has lots
of clues on this, and based on his suggestion I've now removed the check of
that byte since it seems to be able to contain 1 or 5.
2005-01-10 23:32:14 +00:00
Daniel Stenberg 065e466f1a Use Curl_easy_addmulti() to clear associations from easy handles to multi
handles. Include multi.h to get proto.
2005-01-10 11:42:20 +00:00
Daniel Stenberg 21bb852750 Pavel Orehov reported memory problems with the multi interface in bug report
#1098843. In short, a shared DNS cache was setup for a multi handle and when
the shared cache was deleted before the individual easy handles, the latter
cleanups caused read/writes to already freed memory.
2005-01-10 10:07:07 +00:00
Daniel Stenberg 83bab78bda Hzhijun reported a memory leak in the SSL certificate code, that leaked the
remote certificate name when it didn't match the used host name.
2005-01-10 09:48:39 +00:00
Gisle Vanem 9fd33c0b96 New file. 2005-01-08 16:06:37 +00:00
Gisle Vanem 3c09f2d2bd Added Makefile.Watcom to EXTRA_DIST. 2005-01-08 16:03:45 +00:00
Gisle Vanem 316e74be74 Removed _WIN32_WINNT to support IPv6 under Win-2K. 2005-01-04 16:00:14 +00:00
Daniel Stenberg ad9648a215 reverted the bad naming of the implib names 2005-01-02 21:15:29 +00:00
Daniel Stenberg 1576f3319e Alex Neblett's minor update 2005-01-02 19:19:32 +00:00
Daniel Stenberg 67abd4cd47 Rune Kleveland fixed a minor memory leak for received cookies with the (rare)
version attribute set.
2004-12-22 22:33:31 +00:00
Daniel Stenberg 58f4af7973 Marcin Konicki provided two configure fixes and a source fix to make curl
build out-of-the-box on BeOS.
2004-12-22 22:28:10 +00:00
Dan Fandrich 99befd3a15 C ensures that static variables are initialized to 0 2004-12-22 20:12:15 +00:00
Daniel Stenberg 444f6427b8 oops, variables first then code 2004-12-21 14:33:37 +00:00
Daniel Stenberg a173e07eec Prevent failf() from using the va_list variable more than once.
See bug report #1088962 and  Single Unix Specification:
http://www.opengroup.org/onlinepubs/007908799/xsh/vfprintf.html
2004-12-21 14:22:10 +00:00
Daniel Stenberg f4c5314890 include sys/types.h before sys/select.h 2004-12-21 10:11:07 +00:00
Dan Fandrich 80d301257c Make some more arrays of pointers const. 2004-12-20 18:23:43 +00:00
Gisle Vanem 13ee90bbd4 OpenSSL updates; get CA_BUNDLE from env. Assume no
Kerberos, have <pkcs12.h>, <engine.h> and built-in engines.
2004-12-19 11:52:31 +00:00
Gisle Vanem 754d6c3abd Remove 'data' initialiser. 2004-12-19 11:39:34 +00:00
Daniel Stenberg 3d647b9a98 if the pkcs12.h header exists, include it already in urldata.h to work around
a precedence problem with the zlib header. See CHANGES for details.
2004-12-19 09:37:32 +00:00
Daniel Stenberg 8ad47a13e5 Samuel Listopad added support for PKCS12 formatted certificates. 2004-12-18 10:42:48 +00:00
Dan Fandrich a07dcfd850 Renamed a variable to avoid conflict with a C++ reserved word. 2004-12-17 20:18:53 +00:00
Gisle Vanem 321511a5be Watcom has strtoll(). 2004-12-17 19:57:50 +00:00
Gisle Vanem c5297b9fd9 Watcom uses 'i64' suffix. 2004-12-17 18:33:09 +00:00
Gisle Vanem 7e00076586 <windows.h> required for Watcom. 2004-12-17 18:32:41 +00:00
Gisle Vanem 41e776f9db Fix calling convention of wlap32.dll function. Watcom
uses fastcall by default, so force cdecl.
2004-12-17 17:54:21 +00:00
Gisle Vanem 5c2d4a6bdd Watcom has 'struct timeval'. 2004-12-17 17:49:10 +00:00
Gisle Vanem 5e2e87cc8d getdate.c is gone. 2004-12-17 12:28:04 +00:00
Gisle Vanem b1bdba7db5 Print true netrc name (.netrc/_netrc). 2004-12-17 12:26:18 +00:00
Daniel Stenberg e3d342df96 avoid an extra malloc 2004-12-17 10:09:32 +00:00
Daniel Stenberg ccf65be0a4 fixed minor memory leak when running out of memory 2004-12-17 09:00:19 +00:00
Daniel Stenberg 7dfef13224 oops, add missing return keyword 2004-12-17 08:58:48 +00:00
Daniel Stenberg 6e1e9caa32 Based on Gisle Vanem's patch: make sure the directory re-use works even when
a URL-encoded path is used.
2004-12-16 22:20:33 +00:00
Gisle Vanem f71725de6e Must include <io.h> and <sys/stat.h> before redefining
stat(), fstat() and lseek().
2004-12-16 21:27:29 +00:00
Dan Fandrich 26fe6da93b Renamed a struct member to avoid conflict with a C++ reserved word. 2004-12-16 21:27:23 +00:00
Daniel Stenberg 8d4ac69175 reduced the number of sub-blocks 2004-12-16 18:18:23 +00:00
Daniel Stenberg 4f5a6a33b4 moved the lseek() and stat() magic defines to setup.h and now take advantage
of struct_stat in formdata.c as well, to support formpost uploads of large
files on Windows too
2004-12-16 18:09:27 +00:00
Daniel Stenberg 494c40fd98 NULL the fp pointer after it has been fclosed() 2004-12-16 13:55:19 +00:00
Daniel Stenberg d3b414724b Dinar in bug report #1086121, found a file handle leak when a multipart
formpost (including a file upload part) was aborted before the whole file was
sent.
2004-12-16 09:52:36 +00:00
Daniel Stenberg 95b84adb9b precaution to prevent double typedefs of the bool 2004-12-15 14:05:07 +00:00
Dan Fandrich a28b32aa45 Make some arrays of pointers const, too. 2004-12-15 02:32:04 +00:00
Dan Fandrich 1ba47e7af9 Add 'const' to immutable arrays. 2004-12-15 01:38:25 +00:00
Daniel Stenberg 553082e24a prevent compiler warning when built without engine support 2004-12-14 22:06:25 +00:00
Daniel Stenberg 0d0d5e7ee3 Harshal Pradhan fixed changing username/password on a persitent HTTP
connection.
2004-12-14 21:22:51 +00:00
Dan Fandrich f23d923fd3 Only declare static variables if they're needed. Fixed some compile warnings. 2004-12-14 20:44:36 +00:00
Dan Fandrich 10d6d8b2ae Header files are in openssl/ only if USE_OPENSSL is set. 2004-12-14 20:25:23 +00:00
Dan Fandrich 358e08b95d Removed fputc() prototype since it's already in stdio.h 2004-12-14 20:17:58 +00:00
Gisle Vanem 7d3f5d7ac1 urldata.h: Removed engine_list.
ssluse.*: Added SSL_strerror(). Curl_SSL_engines_list() now returns a slist
which must be freed by caller.
2004-12-14 14:20:21 +00:00
Daniel Stenberg 07f107ae20 Moved the engine stuff from the root-level of the SessionHandle struct to the
UrlState sub-struct. Also made the engine_list exist for non-ssl builds to
make curl build.
2004-12-14 09:36:22 +00:00
Gisle Vanem 1dc15ec1bc Set 'data->state.os_errno = error' in some places.
Needed elsewhere too?
2004-12-13 17:52:55 +00:00
Gisle Vanem bdb0620529 Added handling of CURLINFO_SSL_ENGINES;
Added Curl_SSL_engines_list(), cleanup SSL in url.c
(no HAVE_OPENSSL_x etc.).
2004-12-13 16:43:00 +00:00
Gisle Vanem be9ea07e87 Handle new type CURLINFO_SLIST.
Handle new info list CURLINFO_SSL_ENGINES.
2004-12-13 16:37:27 +00:00
Daniel Stenberg 344c6a3725 Gisle's fix for resuming large file:// files on windows - slightly edited
by me.
2004-12-13 10:25:26 +00:00
Daniel Stenberg fec571f5b0 modified to use the current error code name, not the obsolete one 2004-12-11 22:18:11 +00:00
Daniel Stenberg 1b8ac7c6b5 provide an error string when resuming fails - and use the proper error code,
not the former one
2004-12-11 18:55:51 +00:00
Daniel Stenberg bd2db87237 fixed error message 2004-12-11 18:55:23 +00:00
Daniel Stenberg df3ca59116 Dan Fandrich:
Here's a stab at a consolidation of the SSL detection heuristics into
configure. Source files aren't changed by this patch, except for setup.h and
the various config*.h files.  Within the configure script, OPENSSL_ENABLED is
used to determine if SSL is being used or not, and outside configure,
USE_SSLEAY means the same thing; this could be even further unified some day.

Now, when SSL is not detected, configure skips the various checks that are
dependent on SSL, speeding up the configure process and avoiding complications
with cross compiles.  I also updated all the architecture- specific config
files I could see, but I couldn't test them.
2004-12-11 18:47:22 +00:00
Daniel Stenberg 357fdb60b6 Dan Fandrich: added some missing files. "I can't try them so they might still
be broken, but at least they'll be less broken than they are now."
2004-12-10 21:58:11 +00:00
Daniel Stenberg 8a4eb8ed45 move the port number extraction to after the extraction of user name/password,
as suggested by Kai Sommerfeld
2004-12-10 15:11:11 +00:00
Daniel Stenberg c0c885a1f3 don't try the rewind if no http struct is allocated yet 2004-12-10 14:45:35 +00:00
Daniel Stenberg 1be1d3cfb8 Matt Veenstra updated to 7.12.3. Starting now, we'll update the version number
in this file automatically on releases using the maketgz script.
2004-12-08 23:09:23 +00:00
Daniel Stenberg b970469df9 Matt Veenstra:
- removal of getdate.c
- Added hostares.c, hostasyn.c, hostip4.c, hostip6.c, hostsync.c,
hostthre.c, inet_ntop.c, nwlib.c, parsedate.c, sterror.c, strtoofft.c

I have tested the build on 10.3, and will build on 10.2.8 in the next days.
2004-12-08 23:02:55 +00:00
Daniel Stenberg 80a324386b Rene Bernhardt found and fixed a buffer overrun in the NTLM code, where
libcurl always and unconditionally overwrote a stack-based array with 3 zero
bytes. I edited the fix to make it less likely to occur again (and added
a comment explaining the reason to the buffer size).
2004-12-07 23:09:41 +00:00
Daniel Stenberg c78ee11c41 CURLFTPSSL_ALL should make sure that the transfer fails if the data connection
isn't set to encrypted properly
2004-12-07 10:00:20 +00:00
Daniel Stenberg 4435e3b269 Fixed so that the final error message is sent to the verbose info "stream"
even if no errorbuffer is set.
2004-12-06 23:04:30 +00:00
Daniel Stenberg b96a0dba90 Gisle Vanem's fix for better info messages when failing to connect using
the multi interface
2004-12-06 22:45:45 +00:00
Gisle Vanem 30dfc00a54 'crypto_engine' not used. 2004-12-06 16:36:50 +00:00
Gisle Vanem fe5979cfdb Replace MINGW32 with built-in __MINGW32__. 2004-12-06 14:43:04 +00:00
Daniel Stenberg ac269a8f68 Dan Fandrich added the --disable-cookies option to configure to build
libcurl without cookie support. This is mainly useful if you want to build a
minimalistic libcurl with no cookies support at all. Like for embedded
systems or similar.
2004-12-05 23:59:32 +00:00
Daniel Stenberg 35944744f8 Richard Atterer fixed libcurl's way of dealing with the EPSV
response. Previously, libcurl would re-resolve the host name with the new
port number and attempt to connect to that, while it should use the IP from
the control channel. This bug made it hard to EPSV from an FTP server with
multiple IP addresses!
2004-12-05 23:33:33 +00:00
Daniel Stenberg 2c27e4ee76 Bug report #1078066: when a chunked transfer was pre-maturely closed exactly
at a chunk boundary it was not considered an error and thus went unnoticed.
Added test case 207 to verify.
2004-12-03 09:31:25 +00:00
Daniel Stenberg 6ac9e67bd7 made the intended one hour default timeout in the CONNECT loop actually work 2004-12-02 23:30:13 +00:00
Daniel Stenberg 8726a6b6ed comment cleanup 2004-12-02 22:52:14 +00:00
Daniel Stenberg 15360e5e51 prevent an initial "(nil)" to get sent in the initial request when doing
CONNECT to a proxy with digest
2004-12-02 17:08:37 +00:00
Gisle Vanem bfa74c2649 alarm() works unreliable on djgpp 2.03. Don't use it. 2004-11-30 14:59:24 +00:00
Daniel Stenberg c28e15c682 Dan Fandrich's fix for libz 1.1 and "extra field" usage in a gzip stream 2004-11-30 09:44:54 +00:00
Daniel Stenberg 0966ddafaa As reported in Mandrake's bug tracker bug 12285
(http://qa.mandrakesoft.com/show_bug.cgi?id=12285), when connecting to an
IPv6 host with FTP, --disable-epsv (or --disable-eprt) effectively disables
the ability to transfer a file. Now, when connected to an FTP server with
IPv6, these FTP commands can't be disabled even if asked to with the
available libcurl options.
2004-11-29 21:25:07 +00:00
Daniel Stenberg 5ae34aa8e1 killed trailing whitespace 2004-11-29 12:11:46 +00:00
Daniel Stenberg c0d448f778 if gmtime() returns NULL, this returns -1 to bail out nicely 2004-11-29 08:10:10 +00:00
Daniel Stenberg a4752673bb typecast the coversion from long to int 2004-11-27 09:27:48 +00:00
Gisle Vanem d85bc18178 I changed my mind. Remove ioctl() macro in setup.h instead. 2004-11-26 16:08:15 +00:00
Gisle Vanem af114358c8 Renamed urldata.h members 'ioctl*' to 'ioctrl*' due to
clash with djgpp ioctl() macro in setup.h.
2004-11-26 14:57:01 +00:00
Daniel Stenberg ffe17a8197 As reported in Mandrake's bug tracker bug 12289
(http://qa.mandrakesoft.com/show_bug.cgi?id=12289), curl would print a newline
to "finish" the progress meter after each redirect and not only after a
completed transfer.
2004-11-26 14:33:13 +00:00
Daniel Stenberg 2459e1e268 removed no longer used variable 2004-11-26 08:52:18 +00:00
Daniel Stenberg bf51f05a50 FTP improvements:
If EPSV, EPRT or LPRT is tried and doesn't work, it will not be retried on
the same server again even if a following request is made using a persistent
connection.

If a second request is made to a server, requesting a file from the same
directory as the previous request operated on, libcurl will no longer make
that long series of CWD commands just to end up on the same spot. Note that
this is only for *exactly* the same dir. There is still room for improvements
to optimize the CWD-sending when the dirs are only slightly different.

Added test 210, 211 and 212 to verify these changes. Had to improve the
test script too and added a new primitive to the test file format.
2004-11-25 22:21:49 +00:00
Daniel Stenberg 5d94ff5974 made the code fit within 80 cols 2004-11-25 16:49:14 +00:00
Daniel Stenberg 7b3fba1ad5 added missing new error string 2004-11-24 18:25:33 +00:00
Daniel Stenberg 3e1caa6185 HTTP "auth done right". See lib/README.httpauth 2004-11-24 16:11:35 +00:00
Daniel Stenberg 8e34e75100 Curl_select's timeout arg is an int 2004-11-22 13:28:44 +00:00
Daniel Stenberg 1729918777 Dan Fandrich fix to compile with libc5 2004-11-20 08:57:56 +00:00
Gisle Vanem cef290c6b4 Enable >2GB files for MingW. 2004-11-19 15:15:52 +00:00
Gisle Vanem 539e34b5df Suppress signed vs. unsigned warnings on Win32 2004-11-19 14:38:02 +00:00
Daniel Stenberg 765683403f Curl_select() now uses curl_socket_t on socket arguments 2004-11-19 14:03:19 +00:00
Gisle Vanem 2b403db811 Winsock sockets are not in range 0..FD_SETSIZE.
Shouldn't Curl_select() use curl_socket_t ?
2004-11-19 13:46:58 +00:00
Daniel Stenberg 03e7b7c95f add select.obj 2004-11-19 13:45:46 +00:00
Daniel Stenberg 1a05a90f1c David Phillips' FD_SETSIZE fix 2004-11-19 08:52:33 +00:00
Daniel Stenberg dcea109bb5 Dan Fandrich fix: eliminates some pedantic CodeWarrior compiler warnings and
errors.
2004-11-18 14:04:40 +00:00
Daniel Stenberg 7d0d19708a Added README.httpauth to the dist 2004-11-16 14:24:54 +00:00
Daniel Stenberg 09f14efade saved for the future 2004-11-16 14:02:24 +00:00
Daniel Stenberg 5931d43a36 clean up start time and t_startsingle use so that redirect_time works properly 2004-11-15 11:27:03 +00:00
Gisle Vanem c3ecd552f5 Borland doesn't have <sys/utime.h> nor utime(). 2004-11-14 13:49:09 +00:00
Gisle Vanem 56f0227c92 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Added implib command. Cleanup
2004-11-14 13:48:15 +00:00
Daniel Stenberg dcb5a4df01 Dan fixed the CURL_DISABLE_VERBOSE_STRINGS stuff for older gcc versions since
they don't support C99 varargs macros.
2004-11-13 21:57:33 +00:00
Gisle Vanem 61599ceb7b Renamed import lib to "libcurl_imp.lib".
Some cleanup and making it more readable.
2004-11-13 14:17:41 +00:00
Gisle Vanem 98a8103a3b Netware target (hosted on Linux gcc) doesn't support
or need __declspec.
2004-11-12 11:45:05 +00:00
Daniel Stenberg 94043b1150 Dan Fandrich added the --disable-crypto-auth option to configure to allow
libcurl to build without Digest support. (I figure it should also explicitly
disable Negotiate and NTLM.)
2004-11-12 09:18:14 +00:00
Daniel Stenberg 8e2f57c82e Dan Fandrich: make --disable-dict actually disable dict 2004-11-11 23:13:06 +00:00
Daniel Stenberg 59c063dfd3 Fix behaviour when passing NULL to CURLOPT_POSTFIELDS and CURLOPT_HTTPPOST. 2004-11-11 23:11:04 +00:00
Daniel Stenberg 710e370c34 Dan Fandrich added --disable-verbose 2004-11-11 16:34:24 +00:00
Daniel Stenberg cd73a733c7 dates from 2038 or later now return 0x7fffffff when 32 bit time_t is used 2004-11-11 09:26:09 +00:00
Gisle Vanem 865e495188 Handle drive-letter on MS-DOS. 2004-11-09 14:57:11 +00:00
Gisle Vanem 377e43fbb9 Changes for removing libcurl.def file on Win32.
Added "CURL_EXTERN" to memdebug.h functions.
Cleaned up Makefile.vc6.
2004-11-09 14:00:56 +00:00
Gisle Vanem 592686bee9 Change OS name. Fix header guard. 2004-11-08 14:21:24 +00:00
Gisle Vanem f471a293ea Un-do changes for WinCE; cdecl decoration is not needed.
Confirmed by Paul Nolan.
2004-11-08 14:20:14 +00:00
Daniel Stenberg c688166066 check for and require tld.h to be present before libidn usage is activated
in the build, since libidn 0.3.X didn't have the header and we don't support
that old libidn versions anyway.

This was mentioned on the list by Jean-Philippe Barrette-LaPierre and in bug
report #1062264.
2004-11-08 07:47:08 +00:00
Daniel Stenberg 6b49fd7483 Tim Sneddon's VMS fix for huge HTTP POSTs 2004-11-05 14:43:35 +00:00
Daniel Stenberg f10985fc50 removed errno, added EAGAIN 2004-11-05 08:22:46 +00:00
Daniel Stenberg edeac97773 it has a sys/stat.h file, according to Paul Nolan 2004-11-05 08:19:34 +00:00
Daniel Stenberg d3be5b2725 delete trailing whitespace 2004-11-04 16:14:33 +00:00
Daniel Stenberg 4cd5220d27 use ifdef not if 2004-11-02 14:02:29 +00:00
Daniel Stenberg 24d47a6e07 Paul Nolan fix to make libcurl build nicely on Windows CE 2004-11-02 10:12:22 +00:00
Daniel Stenberg 8bfcae65ef Dan Fandrich's gzip handling fix 2004-10-27 21:46:11 +00:00
Daniel Stenberg 7167cde020 Testing to define _REENTRANT unconditionally in here. 2004-10-26 13:31:55 +00:00
Daniel Stenberg a00e7f0f5e Tomas Pospisek filed bug report #1053287 that proved -C - and --fail on a
file that was already completely downloaded caused an error, while it
doesn't if you don't use --fail! I added test case 194 to verify the fix.
Grrr. CURLOPT_FAILONERROR is now added to the list stuff to remove in
libcurl v8 due to all the kludges needed to support it.
2004-10-25 11:28:40 +00:00
Daniel Stenberg beb61ef429 Mohun Biswas found out that formposting a zero-byte file didn't work very
good. I fixed.
2004-10-24 22:31:40 +00:00
Daniel Stenberg 2730842559 Dan Fandrich's better ifdef for include fix 2004-10-21 08:22:07 +00:00
Daniel Stenberg 38b1d96750 Alexander Krasnostavsky made it possible to make FTP 3rd party transfers with
both source and destination being the same host. It can be useful if you want
to move a file on a server or similar.
2004-10-19 18:26:35 +00:00
Daniel Stenberg f4bef25b5e CURLINFO_NUM_CONNECTS and more 2004-10-19 15:30:08 +00:00
Gisle Vanem ebf7d22503 djgpp has locale.h and setlocale(). 2004-10-19 10:14:06 +00:00