Commit Graph

4013 Commits

Author SHA1 Message Date
Yang Tse f48eb36f75 HAVE_FFLUSH and HAVE_FSYNC symbol definitions for WIN32 systems 2008-04-21 19:17:42 +00:00
Dan Fandrich 09777a4fc2 Some trivial changes 2008-04-17 00:45:33 +00:00
Daniel Stenberg 6a33a4456e - Stefan Krause reported a case where the OpenSSL handshake phase wasn't
properly acknowledging the timeout values, like if you pulled the network
  plug in the midst of it.
2008-04-14 15:26:34 +00:00
Daniel Stenberg e0c2a39ad4 - Andre Guibert de Bruet fixed a second case of not checking the malloc()
return code in the Negotiate code.
2008-04-14 15:22:45 +00:00
Daniel Stenberg 79e06c4147 - Sandor Feldi reported bug #1942022
(http://curl.haxx.se/bug/view.cgi?id=1942022) pointing out a mistake in the
  lib/Makefile.vc[68] makefiles' release-ssl-dll target.
2008-04-14 15:19:05 +00:00
Daniel Stenberg 84eb9fee76 - Andre Guibert de Bruet found and fixed a case where malloc() was called but
was not checked for a NULL return, in the Negotiate code.
2008-04-12 11:50:51 +00:00
Patrick Monnerat a08b6ae813 Adapt OS400 SSL (qssl.h) to V5R4
Fix qssl.c wrong error message
Upgrade OS400 wrappers and makefiles to 7.18.1
2008-04-07 13:09:17 +00:00
Michal Marek d0a4b50e19 - Fix the MIT / Heimdal check for good:
Define HAVE_GSSMIT if <gssapi/{gssapi.h,gssapi_generic.h,gssapi_krb5.h}> are
  available, otherwise define HAVE_GSSHEIMDAL if <gssapi.h> is available.

  Only define GSS_C_NT_HOSTBASED_SERVICE to gss_nt_service_name if
  GSS_C_NT_HOSTBASED_SERVICE isn't declared by the gssapi headers. This should
  avoid breakage in case we wrongly recognize Heimdal as MIT again.
2008-04-07 09:26:30 +00:00
Daniel Stenberg ebaf06a741 - Alexey Simak fixed curl_easy_reset() to reset the max redirect limit properly 2008-04-05 21:13:44 +00:00
Daniel Stenberg 34d837c2dd provide CURL_DEFAULT_PROXY_PORT set to 1080 for the default port libcurl
assumes proxies to use
2008-04-05 21:13:31 +00:00
Daniel Stenberg 7607d5145b - Based on the Debian bug report #474224 that complained about the FTP error
message when libcurl doesn't get a 220 back immediately on connect, I now
  changed it to be more specific on what the problem is. Also worth noticing:
  while the bug report contains an example where the response is:

    421 There are too many connected users, please try again later

  we cannot assume that the error message will always be this readable nor
  that it fits within a particular boundary etc.
2008-04-05 21:02:38 +00:00
Daniel Stenberg a9c1ca9fc5 - Setting CURLOPT_NOBODY to FALSE will now switch the HTTP request method to
GET simply because previously when you set CURLOPT_NOBODY to TRUE first and
  then FALSE you'd end up in a broken state where a HTTP request would do a
  HEAD by still act a lot like for a GET and hang waiting for the content etc.
2008-04-03 21:44:49 +00:00
Daniel Stenberg d051dd8087 Scott Barrett added support for CURLOPT_NOBODY over SFTP 2008-04-03 20:56:59 +00:00
Gunter Knauf 3d08b352a2 moved CURL_CA_BUNDLE define to generated config.h. 2008-03-31 12:51:44 +00:00
Michal Marek d13be06aaa Removed the generated ca-bundle.h file. The verbatim value of $ca and
$capath is known to configure, so it can be defined in config.h instead.
2008-03-31 12:09:43 +00:00
Daniel Stenberg f1c69192da expanded a comment around some of the new formpost callback usage 2008-03-31 10:16:34 +00:00
Daniel Stenberg a2314225e0 - Added CURLFORM_STREAM as a supported option to curl_formadd() to allow an
application to provide data for a multipart with the read callback. Note
  that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the
  stream option is used. This feature is verified by the new test case
  554. This feature was sponsored by Xponaut.
2008-03-31 10:02:23 +00:00
Daniel Stenberg b425e851fb - As found out and reported by Dan Petitt, libcurl didn't show progress/call
the progress callback for the first (potentially huge) piece of body data
  sent together with the POST request headers in the initial send().
2008-03-27 13:07:12 +00:00
Daniel Stenberg 2c9763da3e - Made setting the CURLOPT_SSL_CTX_FUNCTION option return a failure in case
libcurl wasn't built to use OpenSSL as that is a prerequisite for this
  option to function!
2008-03-25 19:19:49 +00:00
Daniel Stenberg 95bd901efe - Fixed the problem with doing a zero byte SCP transfer, verified with test
case 617 (which was added by Daniel Fandrich 5 Mar 2008).
2008-03-22 22:00:21 +00:00
Michal Marek 86cbb23282 - Added --with-ca-path=DIRECTORY configure option to use an openSSL CApath by
default instead of a ca bundle. The configure script will also look for a
  ca path if no ca bundle is found and no option given.

- Fixed detection of previously installed curl-ca-bundle.crt
2008-03-20 08:09:23 +00:00
Dan Fandrich e9a460411f Fixed an infinite loop when given an invalid SFTP quote command. 2008-03-18 22:59:04 +00:00
Michal Marek 6f3166c15b - Added curl_easy_getinfo typechecker.
- Added macros for curl_share_setopt and curl_multi_setopt to check at least
  the correct number of arguments.
2008-03-18 08:14:37 +00:00
Daniel Stenberg ad4a9955c5 - 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.
2008-03-13 21:43:30 +00:00
Daniel Stenberg 553ed99e3b Change the confusing two variables for the expect 100 continue stuff into
a single state variable to make the code easier to follow and understand.
2008-03-13 20:56:13 +00:00
Daniel Stenberg b9d66dca51 - 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.
2008-03-11 22:55:23 +00:00
Michal Marek 7a8a20416f - 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 )
2008-03-11 07:37:40 +00:00
Daniel Stenberg 82e095a275 - 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.
2008-03-09 11:37:48 +00:00
Yang Tse 8e9e33ae52 VS2005 and later dafault size for time_t is 64-bit, unless
_USE_32BIT_TIME_T has been defined to get a 32-bit time_t
2008-03-07 02:49:14 +00:00
Yang Tse 91aeebed26 Regression fix:
select/poll calls will only be retried upon EINTR failures as
it previously was in lib/select.c revision 1.29

In this way Curl_socket_ready() and Curl_poll() will again fail
on any select/poll errors different than EINTR.
2008-03-06 03:48:33 +00:00
Daniel Stenberg 0836893335 Mike Protts brought a patch that makes resumed transfers work with SFTP. 2008-03-04 11:53:15 +00:00
Daniel Stenberg 590f0358d8 - Anatoli Tubman found and fixed a crash with Negotiate authentication used on
a re-used connection where both requests used Negotiate.
2008-03-01 22:32:03 +00:00
Gunter Knauf 8f4fda1d6f fixed commented define for SSPI. 2008-02-28 11:34:08 +00:00
Gunter Knauf 7513d29a48 another small change to the makefiles to simplify rules. 2008-02-27 01:36:01 +00:00
Gunter Knauf 724ad15dad some more minor makefile changes; removed useless dist target. 2008-02-26 21:41:19 +00:00
Gunter Knauf 79aa6c841e fixed install target to create a ca-bundle.crt since we have no longer one in the project. 2008-02-26 21:24:03 +00:00
Gunter Knauf 9682c2037e Added support for server name indication (RFC 4366).
Patch submitted by Kaspar Brand.
2008-02-26 10:30:13 +00:00
Daniel Stenberg 74241e7d85 - Kaspar Brand made GnuTLS-built libcurl properly acknowledge the option that
forces it to prefer SSLv3.
2008-02-25 07:51:39 +00:00
Daniel Stenberg 6982ed4db7 - 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.
2008-02-23 12:27:45 +00:00
Daniel Stenberg e9bb7b7712 - 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)
2008-02-21 17:52:16 +00:00
Daniel Stenberg 3bb4602227 assert that the *connp is a non-NULL pointer when Curl_done() is called 2008-02-21 12:28:45 +00:00
Daniel Stenberg 9019fc5671 oops, fixed to build 2008-02-20 10:01:28 +00:00
Daniel Stenberg 53a549000c - 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.
2008-02-20 09:56:26 +00:00
Daniel Stenberg 55700cb01f - 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.
2008-02-20 08:28:02 +00:00
Gunter Knauf f9a6062081 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.
2008-02-19 23:10:07 +00:00
Yang Tse 7b5c86033a fix compiler warnings: 'statement is unreachable' 2008-02-19 17:25:19 +00:00
Yang Tse d2125cf501 fix compiler warnings: 'enumerated type mixed with another type' 2008-02-19 15:07:50 +00:00
Daniel Stenberg 0d722204c3 https_getsock() should be static all over (and did some fixed indenting) 2008-02-18 19:53:31 +00:00
Gunter Knauf e2b50b203d added check symbol for linking with POSIX prelude. 2008-02-18 15:30:11 +00:00
Yang Tse ab0de23d83 fix compiler warnings:
'enumerated type mixed with another type'

and

  'variable was set but never used'
2008-02-18 13:05:46 +00:00
Daniel Stenberg fb23b85770 - 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.
2008-02-18 11:35:12 +00:00
Daniel Stenberg ba3e7a8656 rephrased comment 2008-02-17 13:49:01 +00:00
Daniel Stenberg 240bae4eb2 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.

Jerome Muffat-Meridol helped us work this out.
2008-02-17 13:43:32 +00:00
Daniel Stenberg 4180ca7638 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.
2008-02-17 13:40:35 +00:00
Daniel Stenberg 0e73361a06 added a comment about the ignoring of the Curl_done() return code 2008-02-17 13:38:19 +00:00
Daniel Stenberg 550d6f74b9 oops, that was debug code not meant to be committed like this... 2008-02-16 13:44:23 +00:00
Daniel Stenberg f7b71c2abe fix warnings about shadowing 2008-02-16 13:41:55 +00:00
Gunter Knauf 0da90b5d91 seems that curently we dont need the imports from (l)ldapx.imp. 2008-02-16 00:44:14 +00:00
Gunter Knauf 3e635a2334 re-ordered the module dependency list;
removed unsused ldap module dependency since the module didnt autounload from protected address space.
2008-02-16 00:15:30 +00:00
Daniel Stenberg e78652d850 - 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
2008-02-15 22:37:00 +00:00
Daniel Stenberg 48918c3047 mention that we explicitly ignore the return code 2008-02-15 21:38:54 +00:00
Yang Tse dc42d6fb8d log SSH public key authentication failure and reason 2008-02-15 17:00:56 +00:00
Daniel Stenberg d25aab2704 - 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!
2008-02-15 08:56:06 +00:00
Gunter Knauf cfaf88aab4 fixed version var. 2008-02-15 00:41:54 +00:00
Gunter Knauf ecc75be6f3 moved info block up before help block so that it can also be displayed before help option; trial to add a version number. 2008-02-15 00:26:26 +00:00
Daniel Stenberg fcc320ee40 Yang Tse pointed out a few remaining quirks from my timeout refactoring from
Feb 7 that didn't abort properly on timeouts. These are actually old
problems but now they should be fixed.
2008-02-11 22:03:31 +00:00
Gunter Knauf 019f6a1926 open pipe to openssl commandline instead of writing into temp file. 2008-02-11 18:52:45 +00:00
Dan Fandrich 44fba11b34 Fixed unused variable warning. 2008-02-11 18:27:36 +00:00
Gunter Knauf df07c87b89 added strict to make sure all vars are properly defined;
added -t switch to make text info of CAs optional;
added -q switch to be really quiet.
2008-02-11 15:00:00 +00:00
Yang Tse 736af32b49 Bug report #1888932 (http://curl.haxx.se/bug/view.cgi?id=1888932) points
out and provides test program that demonstrates that libcurl might not set
error description message for error CURLE_COULDNT_RESOLVE_HOST for Windows
threaded name resolver builds. Fixed now.
2008-02-10 04:20:09 +00:00
Gunter Knauf 08e5c0812f added -b switch to provide a backup functionality for existing ca-bundle.crt file. 2008-02-10 01:29:24 +00:00
Gunter Knauf a8c71961e0 fixed another wrong var in error message. 2008-02-09 15:32:54 +00:00
Gunter Knauf 63d595a047 fixed wrong var in error message. 2008-02-09 15:00:07 +00:00
Daniel Stenberg 4c841a1f0c - Mike Hommey filed and fixed bug report #1889856
(http://curl.haxx.se/bug/view.cgi?id=1889856): When using the gnutls ssl
  layer, cleaning-up and reinitializing curl ends up with https requests
  failing with "ASN1 parser: Element was not found" errors. Obviously a
  regression added in 7.16.3.
2008-02-08 22:02:00 +00:00
Daniel Stenberg a2bff51ede include mk-ca-bundle.pl in the tarballs 2008-02-08 09:56:23 +00:00
Gunter Knauf c764331dd9 use argument to specify output filename if present. 2008-02-08 02:38:12 +00:00
Gunter Knauf 586444b6b8 fixed regex to fetch certdata.txt version since it was replaced by CVS (argh!)
added a switch to display certdata.txt version header.
2008-02-08 01:58:11 +00:00
Gunter Knauf d76a74cc5e added Perl script to create a fresh ca-bundle.crt. 2008-02-08 01:08:25 +00:00
Daniel Stenberg 1b701c746f - Refactored a lot of timeout code into a few functions in an attempt to make
them all use the same (hopefully correct) logic to make it less error-prone
  and easier to introduce library-wide where it should be used.
2008-02-07 22:25:04 +00:00
Daniel Stenberg 15bf168527 ca-bundle.crt documentational updates that more clearly describe the bundle
ca-bundle.crt file as outdated and in need for replacement by anyone who wants
to verify modern peers as the one we have is from year 2000!
2008-02-07 15:43:36 +00:00
Yang Tse 20e9fc73e2 Fix problem in strdup replacement when dealing with absolutely huge strings. 2008-02-06 19:01:13 +00:00
Gunter Knauf 7bd098f670 fixed entry symbols when linked with posix prelude. 2008-02-04 22:40:59 +00:00
Gunter Knauf 4b5c504bd4 added makefile flag to link with NLM POSIX semantics. 2008-02-04 22:29:52 +00:00
Daniel Stenberg ffae4f6b48 - Dmitry Kurochkin cleaned up the pipelining code and removed the need for and
use of the "is_in_pipeline" struct field.
2008-02-03 12:31:35 +00:00
Daniel Stenberg a62e155ca4 - Niklas Angebrand made the cookie support in libcurl properly deal with the
"HttpOnly" feature introduced by Microsoft and apparently also supported by
  Firefox: http://msdn2.microsoft.com/en-us/library/ms533046.aspx . HttpOnly
  is now supported when received from servers in HTTP headers, when written to
  cookie jars and when read from existing cookie jars.
2008-01-31 12:21:57 +00:00
Daniel Stenberg b620e62f0f - Dmitry Kurochkin moved several struct fields from the connectdata struct to
the SingleRequest one to make pipelining better. It is a bit tricky to keep
  them in the right place, to keep things related to the actual request or to
  the actual connection in the right place.
2008-01-31 12:04:33 +00:00
Gunter Knauf ea3f63281c silent stupid 'del' message when no files to delete found;
added curl.res to clean target.
2008-01-29 23:46:41 +00:00
Daniel Stenberg 1bfbd25027 - Dmitry Kurochkin fixed Curl_done() for pipelining, as it could previously
crash!
2008-01-29 12:58:25 +00:00
Daniel Stenberg 33d68653f0 this was modified this year so we bump the copyright year 2008-01-28 11:56:13 +00:00
Daniel Stenberg 87fdfe770d Dmitry Kurochkin: In "real world" testing I found more bugs in
pipelining. Broken connection is not restored and we get into infinite
loop. It happens because of wrong is_in_pipeline values.
2008-01-27 22:53:09 +00:00
Daniel Stenberg c6df788866 - Kevin Reed filed bug report #1879375
(http://curl.haxx.se/bug/view.cgi?id=1879375) which describes how libcurl
  got lost in this scenario: proxy tunnel (or HTTPS over proxy), ask to do any
  proxy authentication and the proxy replies with an auth (like NTLM) and then
  closes the connection after that initial informational response.

  libcurl would not properly re-initialize the connection to the proxy and
  continue the auth negotiation like supposed. It does now however, as it will
  now detect if one or more authentication methods were available and asked
  for, and will thus retry the connection and continue from there.

- I made the progress callback get called properly during proxy CONNECT.
2008-01-25 23:33:45 +00:00
Gunter Knauf d54c14ccf9 updated makefiles to use global copyright define. 2008-01-24 15:28:47 +00:00
Gunter Knauf 2d38d0d515 minor makefile tweaks. 2008-01-24 15:05:56 +00:00
Gunter Knauf e322513698 use copyright define instead of hardcoded string. 2008-01-24 14:10:59 +00:00
Daniel Stenberg c914e6ea5d "Igor" pointed out that CURLOPT_COOKIELIST set to "ALL" leaked memory, and so
did "SESS". Fixed now.
2008-01-23 22:22:12 +00:00
Daniel Stenberg 79cb74f03a Dmitry Kurochkin's pipelining close-down segfault fix 2008-01-23 12:22:04 +00:00
Yang Tse 34cf35051a update openssl version 2008-01-23 07:27:40 +00:00
Gunter Knauf 5ee3f41e0d happy new year 2008-01-23 02:12:13 +00:00
Gunter Knauf 64e88ff6a7 removed inclusion of libcurl memory debug headers since this lib stub is a well proofed method suggested by Novell. This enables usage of the stub with language bindings. 2008-01-23 02:10:40 +00:00
Yang Tse acd7c94598 when unable to initialize sftp session, also log failure reason 2008-01-22 17:26:42 +00:00