Dan Fandrich [Thu, 13 Mar 2008 22:51:39 +0000 (22:51 +0000)]
Added tests 622-625 to test SFTP/SCP uploads. Test 625 was an attempt to
reproduce the --ftp-create-dirs problem reported by Brian Ulm, but that
seems to need a call curl_easy_reset() which this test case doesn't do.
Daniel Stenberg [Thu, 13 Mar 2008 21:43:39 +0000 (21:43 +0000)]
- Brian Ulm figured out that if you did an SFTP upload with
CURLOPT_FTP_CREATE_MISSING_DIRS to create a directory, and then re-used the
handle and uploaded another file to another directory that needed to be
created, the second upload would fail. Another case of a state variable that
wasn't properly reset between requests.
- I rewrote the 100-continue code to use a single state variable instead of
the previous two ones. I think it made the logic somewhat clearer.
Daniel Stenberg [Thu, 13 Mar 2008 21:43:30 +0000 (21:43 +0000)]
- Brian Ulm figured out that if you did an SFTP upload with
CURLOPT_FTP_CREATE_MISSING_DIRS to create a directory, and then re-used the
handle and uploaded another file to another directory that needed to be
created, the second upload would fail. Another case of a state variable that
wasn't properly reset between requests.
Daniel Stenberg [Tue, 11 Mar 2008 22:55:23 +0000 (22:55 +0000)]
- Dmitry Popov filed bug report #1911069
(http://curl.haxx.se/bug/view.cgi?id=1911069) that identified a race
condition in the name resolver code when the DNS cache is shared between
multiple easy handles, each running in simultaneous threads that could cause
crashes.
Daniel Stenberg [Tue, 11 Mar 2008 13:14:16 +0000 (13:14 +0000)]
- Added a macro for curl_easy_setopt() that accepts three arguments and simply
does nothing with them, just to make sure libcurl users always use three
arguments to this function. Due to its use of ... for the third argument, it
is otherwise hard to detect abuse.
Daniel Stenberg [Tue, 11 Mar 2008 12:18:00 +0000 (12:18 +0000)]
Recommend passing a 1 as parameter to CURLOPT_SSLENGINE_DEFAULT rather than
a "dummy" just to get things as fixed as possible in case we ever get the urge
to change this to actually mean something.
Michal Marek [Tue, 11 Mar 2008 07:37:40 +0000 (07:37 +0000)]
- Added a type checking macro for curl_easy_setopt(), needs gcc-4.3 and only
works in C mode atm (http://curl.haxx.se/mail/lib-2008-02/0267.html ,
http://curl.haxx.se/mail/lib-2008-02/0292.html )
Daniel Stenberg [Sun, 9 Mar 2008 11:37:48 +0000 (11:37 +0000)]
- Brian Ulm reported a crash when doing a second SFTP transfer on a re-used
easy handle if curl_easy_reset() was used between them. I fixed it and Brian
verified that it cured his problem.
- Brian Ulm reported that if you first tried to download a non-existing SFTP
file and then fetched an existing one and re-used the handle, libcurl would
still report the second one as non-existing as well! I fixed it abd Brian
verified that it cured his problem.
Dan Fandrich [Thu, 6 Mar 2008 01:15:28 +0000 (01:15 +0000)]
Added tests 616 and 617 to see how SFTP and SCP cope with zero-length
files, as questioned by Mike Protts. SFTP does for me but SCP doesn't
so test 617 is disabled for now.
Yang Tse [Fri, 29 Feb 2008 17:13:39 +0000 (17:13 +0000)]
Force AIX xlc to fail and not generate object code if the source code has
compiled with errors. This behaviour is needed for autoconf macros which
rely on the ability to compile with or without errors, and is safer than
xlc's default of failing only upon severe errors.
Daniel Stenberg [Thu, 28 Feb 2008 21:25:00 +0000 (21:25 +0000)]
Removed:
121 - Kaspar Brand's and Guenter Knauf's work on the TLS extension Server Name
Indication is now committed
122 - Progress callback not called during failed socket connect with the multi
interface, is now simply pending a closure since no feedback has been
received lately.
Gunter Knauf [Wed, 27 Feb 2008 01:43:12 +0000 (01:43 +0000)]
a couple of small fixes to the makefile:
fixed comments; fixed INSTDIR define, simplified rules;
changed to use get_ver.awk in current dir rather than the curl one.
Daniel Stenberg [Sat, 23 Feb 2008 12:27:45 +0000 (12:27 +0000)]
- Sam Listopad provided a patch in feature-request #1900014
http://curl.haxx.se/bug/feature.cgi?id=1900014 that makes libcurl (built to
use OpenSSL) support a full chain of certificates in a given PKCS12
certificate.
Daniel Stenberg [Thu, 21 Feb 2008 17:52:16 +0000 (17:52 +0000)]
- Zmey Petroff found a crash when libcurl accessed a NULL pointer, which
happened if you set the connection cache size to 1 and for example failed to
login to an FTP site. Bug report #1896698
(http://curl.haxx.se/bug/view.cgi?id=1896698)
Daniel Stenberg [Wed, 20 Feb 2008 09:56:26 +0000 (09:56 +0000)]
- Based on initial work done by Gautam Kachroo to address a bug, we now keep
better control at the exact state of the connection's SSL status so that we
know exactly when it has completed the SSL negotiation or not so that there
won't be accidental re-uses of connections that are wrongly believed to be
in SSL-completed-negotiate state.
Daniel Stenberg [Wed, 20 Feb 2008 08:28:02 +0000 (08:28 +0000)]
- We no longer support setting the CURLOPT_URL option from inside a callback
such as the CURLOPT_SSL_CTX_FUNCTION one treat that as if it was a Location:
following. The patch that introduced this feature was done for 7.11.0, but
this code and functionality has been broken since about 7.15.4 (March 2006)
with the introduction of non-blocking OpenSSL "connects".
It was a hack to begin with and since it doesn't work and hasn't worked
correctly for a long time and nobody has even noticed, I consider it a very
suitable subject for plain removal. And so it was done.
Gunter Knauf [Tue, 19 Feb 2008 23:10:07 +0000 (23:10 +0000)]
applied patch to disable SSLv2 by default; discussion:
http://sourceforge.net/tracker/index.php?func=detail&aid=1767276&group_id=976&atid=350976
Submitted by Kaspar Brand.
Daniel Stenberg [Mon, 18 Feb 2008 11:35:12 +0000 (11:35 +0000)]
- We're no longer providing a very old ca-bundle in the curl tarball. You can
get a fresh one downloaded and created with 'make ca-bundle' or you can get
one from here => http://curl.haxx.se/docs/caextract.html if you want a fresh
new one extracted from Mozilla's recent list of ca certs.
The configure option --with-ca-bundle now lets you specify what file to use
as default ca bundle for your build. If not specified, the configure script
will check a few known standard places for a global ca cert to use.
Daniel Stenberg [Sun, 17 Feb 2008 13:49:58 +0000 (13:49 +0000)]
- Jerome Muffat-Meridol helped me fix Curl_done() to close the current
connection by force when it was called before the entire request is
completed, simply because we can't know if the connection really can be
re-used safely at that point.
Daniel Stenberg [Sun, 17 Feb 2008 13:43:32 +0000 (13:43 +0000)]
In Curl_done() if premature is TRUE, it means this connection was said to be
DONE before the entire request operation is complete and thus we can't know in
what state it is for re-using, so we're forced to close it. In a perfect world
we can add code that keep track of if we really must close it here or not, but
currently we have no such detail knowledge.
Daniel Stenberg [Sun, 17 Feb 2008 13:40:35 +0000 (13:40 +0000)]
don't do the GOT_NOTHING error check if the DONE function was called with
premature set TRUE, which means it was done before the request comleted. It
could then very well not have received any data.
Daniel Stenberg [Fri, 15 Feb 2008 22:37:00 +0000 (22:37 +0000)]
- Made the gnutls code path not even try to get the server cert if no peer
verification is requested. Previously it would even return failure if gnutls
failed to get the server cert even though no verification was asked for.
- Fix my Curl_timeleft() leftover mistake in the gnutls code
Daniel Stenberg [Fri, 15 Feb 2008 08:56:06 +0000 (08:56 +0000)]
- Pooyan McSporran found and fixed a flaw where you first would do a normal
http request and then you'd reuse the handle and replace the Accept: header,
as then libcurl would send two Accept: headers!