platform/upstream/curl.git
14 years agoAdded PolarSSL to the docs
Dan Fandrich [Mon, 26 Jul 2010 23:38:29 +0000 (16:38 -0700)]
Added PolarSSL to the docs

14 years agocurl-config: --built-shared returns shared info
Daniel Stenberg [Sun, 25 Jul 2010 15:48:07 +0000 (17:48 +0200)]
curl-config: --built-shared returns shared info

The curl-config now features a --built-shared command line option that
will output 'yes' or 'no' depending if the build process was asked to
build shared library/libraries or not.

It is primarily made to offer more details to the test suite to know
what kind of stunts it can expect to work.

14 years agoadd_buffer_send: fix compiler warning
Daniel Stenberg [Sat, 24 Jul 2010 20:52:35 +0000 (22:52 +0200)]
add_buffer_send: fix compiler warning

Win64's 32 bit long but 64 bit size_t caused a warning that we avoid
with a typecast. A small whitespace indent fix was also applied.

Reported by: Adam Light

14 years agoUpdated library versions.
Guenter Knauf [Thu, 22 Jul 2010 02:34:54 +0000 (04:34 +0200)]
Updated library versions.

14 years agoFixed script version which was still based on CVS Revision tag.
Guenter Knauf [Thu, 22 Jul 2010 02:29:54 +0000 (04:29 +0200)]
Fixed script version which was still based on CVS Revision tag.

14 years agoFAQ: Why doesn't cURL error out when the cable is unplugged?
Dan Fandrich [Wed, 21 Jul 2010 22:15:07 +0000 (15:15 -0700)]
FAQ: Why doesn't cURL error out when the cable is unplugged?

This one was long overdue to be mentioned in the FAQ. Also, mention the
new ftp wildcard downloading feature.

14 years agossh: Fix compile error on 64-bit systems.
Ben Greear [Mon, 19 Jul 2010 16:06:20 +0000 (18:06 +0200)]
ssh: Fix compile error on 64-bit systems.

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years agobuild: Enable configure --enable-werror
Ben Greear [Mon, 19 Jul 2010 16:07:09 +0000 (18:07 +0200)]
build: Enable configure --enable-werror

  This passes -Werror to gcc when building curl and libcurl,
  allowing easy dection of compile warnings.

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years agopingpong: Fix indentation (whitespace change only)
Ben Greear [Mon, 19 Jul 2010 16:07:50 +0000 (18:07 +0200)]
pingpong: Fix indentation (whitespace change only)

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years agoCUSTOMREQUEST: shouldn't be disabled when HTTP is disabled
Jan Van Boghout [Sun, 18 Jul 2010 18:23:08 +0000 (20:23 +0200)]
CUSTOMREQUEST: shouldn't be disabled when HTTP is disabled

... since FTP is using it as well, and potentially other protocols!

Also, an #endif CURL_DISABLE_HTTP was incorrectly marked, as it seems to
end the proxy block instead.

14 years agopingpong: response_time is milliseconds
Jan Van Boghout [Sat, 17 Jul 2010 22:49:29 +0000 (00:49 +0200)]
pingpong: response_time is milliseconds

Fixed the comment/document for the response_time struct member.

14 years agoftp: response timeout bug in "quote" sending
Jan Van Boghout [Sat, 17 Jul 2010 22:44:25 +0000 (00:44 +0200)]
ftp: response timeout bug in "quote" sending

The FTP implementation was missing a timestamp reset point, making the
waiting for responses after sending a post-transfer "QUOTE" command not
working as supposedly. This bug was introduced in 7.20.0

14 years agoremote-header-name: chop filename at next semicolon
Jeff Pohlmeyer [Sat, 17 Jul 2010 18:04:02 +0000 (20:04 +0200)]
remote-header-name: chop filename at next semicolon

The --remote-header-name option for the command-line tool assumes that
everything beyond the filename= field is part of the filename, but that
might not always be the case, for example:

Content-Disposition: attachment; filename=file.txt; modification-date=...

This fix chops the filename off at the next semicolon, if there is one.

14 years ago--retry: access violation with URL part sets continued
Daniel Stenberg [Wed, 14 Jul 2010 21:50:01 +0000 (23:50 +0200)]
--retry: access violation with URL part sets continued

When getting multiple URLs, curl didn't properly reset the byte counter
after a successful transfer so if the subsequent transfer failed it
would wrongly use the previous byte counter and behave badly (segfault)
because of that. The code assumes that the byte counter and the 'stream'
pointer is well in synch.

Reported by: Jon Sargeant
Bug: http://curl.haxx.se/bug/view.cgi?id=3028241

14 years agoreleasnote: synch up with commit f3b77e5611d
Daniel Stenberg [Tue, 13 Jul 2010 22:40:20 +0000 (00:40 +0200)]
releasnote: synch up with commit f3b77e5611d

14 years agoexamples: add curl_multi_timeout
Constantine Sapuntzakis [Tue, 13 Jul 2010 22:32:53 +0000 (00:32 +0200)]
examples: add curl_multi_timeout

Make the multi-interface using examples use curl_multi_timeout to
properly educate users how to do things.

14 years agoconfigure: document the STATICLIB variable
Daniel Stenberg [Mon, 12 Jul 2010 21:40:16 +0000 (23:40 +0200)]
configure: document the STATICLIB variable

14 years agomulti: fix condition that remove timers before trigger
Constantine Sapuntzakis [Mon, 12 Jul 2010 17:19:31 +0000 (19:19 +0200)]
multi: fix condition that remove timers before trigger

curl_multi perform has two phases: run through every easy handle calling
multi_runsingle and remove expired timers (timer removal).

If a small timer (e.g. 1-10ms) is set during multi_runsingle, then it's
possible that the timer has passed by when the timer removal runs. The
timer which was just added is then removed. This will potentially cause
the timer list to be empty and cause the next call to curl_multi_timeout
to return -1. Ideally, curl_multi_timeout should return 0 in this case.

One way to fix this is to move the struct timeval now = Curl_tvnow(); to
the top of curl_multi_perform. The change does that.

14 years agothreaded resolver: fix timeout issue
Constantine Sapuntzakis [Mon, 12 Jul 2010 17:03:51 +0000 (19:03 +0200)]
threaded resolver: fix timeout issue

Reset old timer first so we can set a new one further in the future.

14 years agoconfigure: allow environments variable to override internals
Daniel Stenberg [Mon, 12 Jul 2010 16:39:40 +0000 (18:39 +0200)]
configure: allow environments variable to override internals

configure checks for grep, egrep, sed and ar and set the variables GREP,
EGREP, SED and AR accordingly. We now let already set variables override
the internal choices to let users make decisions when they know the
right choice already. This is a regression as our configure script used
to allow this back before commit 0b57c475 (up to 7.18.2).

Reported by: "kdekker"
Bug: http://curl.haxx.se/bug/view.cgi?id=3028318

14 years agoImproved the Android build instructions
Dan Fandrich [Fri, 9 Jul 2010 23:11:36 +0000 (16:11 -0700)]
Improved the Android build instructions

14 years agoupload: Avoid infinite loop when checking for auth bits
Tor Arntsen [Wed, 7 Jul 2010 09:55:31 +0000 (11:55 +0200)]
upload: Avoid infinite loop when checking for auth bits

The test would loop forever if authtype bit 0 wasn't set.

14 years agoupload: warn users trying to upload from stdin with anyauth
Daniel Stenberg [Tue, 6 Jul 2010 21:25:32 +0000 (23:25 +0200)]
upload: warn users trying to upload from stdin with anyauth

Since uploading from stdin is very likely to not work with anyauth and
its multi-phase probing for what authentication to actually use, alert
the user about it. Multi-phase negotiate almost certainly will involve
sending data and thus libcurl will need to rewind the stream to send
again, and it cannot do that with stdin.

14 years agohttp: don't enable chunked during authentication negotiations
Daniel Stenberg [Tue, 6 Jul 2010 20:50:21 +0000 (22:50 +0200)]
http: don't enable chunked during authentication negotiations

As mentioned in bug report #2956968, the HTTP code wouldn't send the
first empty chunk during the auth negotiation phase of the HTTP request
sending, so the server would wait for data to come and libcurl would
wait for data to arrive... I've made the code not enable chunked
encoding until the auth negotiation is done and thus this scenario
doesn't occur anymore.

Reported by: Sidney San Martín
Bug: http://curl.haxx.se/bug/view.cgi?id=2956968

14 years ago--libcurl: list the tricky options instead of using [REMARK]
Daniel Stenberg [Tue, 6 Jul 2010 20:44:19 +0000 (22:44 +0200)]
--libcurl: list the tricky options instead of using [REMARK]

I think the [REMARK] and commented function calls cluttered the code a
bit too much and made the generated code ugly to read. Now we instead
track the remarks one specially and just lists them at the end of the
generated code more as additional information.

14 years agocurl: avoid setting libcurl options to its default
Daniel Stenberg [Tue, 6 Jul 2010 20:43:05 +0000 (22:43 +0200)]
curl: avoid setting libcurl options to its default

it makes the --libcurl output easier to follow.

14 years ago--libcurl: hide setopt() calls setting default options
Daniel Stenberg [Tue, 6 Jul 2010 20:13:22 +0000 (22:13 +0200)]
--libcurl: hide setopt() calls setting default options

And additionally, don't show function or object pointers actual value
since they make no sense to anyone. Show 'functionpointer' and
'objectpointer' instead.

14 years ago--libcurl: use *_LARGE options with typecasted constants
Daniel Stenberg [Tue, 6 Jul 2010 17:19:52 +0000 (19:19 +0200)]
--libcurl: use *_LARGE options with typecasted constants

In the generated code --libcurl makes, all calls to curl_easy_setopt()
that use *_LARGE options now have the value typecasted to curl_off_t, so
that it works correctly for 32bit systems with 64bit curl_off_t type.

14 years agomulti: CURLINFO_LASTSOCKET doesn't work after remove_handle
Daniel Stenberg [Thu, 1 Jul 2010 21:32:20 +0000 (23:32 +0200)]
multi: CURLINFO_LASTSOCKET doesn't work after remove_handle

When curl_multi_remove_handle() is called and an easy handle is returned
to the connection cache held in the multi handle, then we cannot allow
CURLINFO_LASTSOCKET to extract it since that will more or less encourage
that the user uses the socket while it can get used by libcurl again.

Without this fix, we'd get a segfault in Curl_getconnectinfo() trying to
dereference the NULL pointer in 'data->state.connc'.

Bug: http://curl.haxx.se/bug/view.cgi?id=3023840

14 years agobuild: add enable IPV6 option for the VC makefiles
Pierre Joye [Wed, 30 Jun 2010 17:40:40 +0000 (19:40 +0200)]
build: add enable IPV6 option for the VC makefiles

14 years agoFAQ: the threaded resolver works universally now
Daniel Stenberg [Wed, 30 Jun 2010 13:52:58 +0000 (15:52 +0200)]
FAQ: the threaded resolver works universally now

14 years agohttp_ntlm: add support for NSS
Kamil Dudka [Sun, 27 Jun 2010 01:38:01 +0000 (03:38 +0200)]
http_ntlm: add support for NSS

When configured with '--without-ssl --with-nss', NTLM authentication
now uses NSS crypto library for MD5 and DES.  For MD4 we have a local
implementation in that case.  More details are available at
https://bugzilla.redhat.com/603783

In order to get it working, curl_global_init() must be called with
CURL_GLOBAL_SSL or CURL_GLOBAL_ALL.  That's necessary because NSS needs
to be initialized globally and we do so only when the NSS library is
actually required by protocol.  The mentioned call of curl_global_init()
is responsible for creating of the initialization mutex.

There was also slightly changed the NSS initialization scenario, in
particular, loading of the NSS PEM module.  It used to be loaded always
right after the NSS library was initialized.  Now the library is
initialized as soon as any SSL or NTLM is required, while the PEM module
is prevented from being loaded until the SSL is actually required.

14 years agoglob: backslash escaping bug
Daniel Stenberg [Mon, 28 Jun 2010 22:17:38 +0000 (00:17 +0200)]
glob: backslash escaping bug

curl didn't properly handle escaping characters in a URL with the use of
backslash. It did an attempt, but that failed as reported in bug
3022551. The described example was using the URL
"http://example.com?{AB,C\,D}".

I've now removed the special-handling of letters following the backslash
and I also removed the bad extra check that triggered this particular
bug.

Bug: http://curl.haxx.se/bug/view.cgi?id=3022551
Reported by: Jon Sargeant

14 years agorelease-notes: sync up with recent commits
Daniel Stenberg [Mon, 28 Jun 2010 22:13:04 +0000 (00:13 +0200)]
release-notes: sync up with recent commits

14 years agoCONTRIBUTE: the git commit message line length is 72 columns
Daniel Stenberg [Sat, 26 Jun 2010 21:17:02 +0000 (23:17 +0200)]
CONTRIBUTE: the git commit message line length is 72 columns

14 years agoftp wildcard: FTP LIST parser FIX
Pavel Raiskup [Thu, 24 Jun 2010 14:11:55 +0000 (16:11 +0200)]
ftp wildcard: FTP LIST parser FIX

There was a problem when a UNIX-like server returned information
about directory size (total NNNNNN) at the first line of
response.

14 years agoexamples: new FTP wildcard showcase
Pavel Raiskup [Thu, 24 Jun 2010 15:22:47 +0000 (17:22 +0200)]
examples: new FTP wildcard showcase

14 years agomulti_socket: re-use of same socket without notifying app
Daniel Stenberg [Thu, 24 Jun 2010 21:19:27 +0000 (23:19 +0200)]
multi_socket: re-use of same socket without notifying app

When a hostname resolves to multiple IP addresses and the first one
tried doesn't work, the socket for the second attempt may get dropped on
the floor, causing the request to eventually time out. The issue is that
when using kqueue (as on mac and bsd platforms) instead of select, the
kernel removes the first fd from kqueue when it is closed (in trynextip,
connect.c:503). Trynextip() then goes on to open a new socket, which
gets assigned the same number as the one it just closed. Later in
multi.c, socket_cb is not called because the fd is already in
multi->sockhash, so the new socket is never added to kqueue.

The correct fix is to ensure that socket_cb is called to remove the fd
when trynextip() closes the socket, and again to re-add it after
singleipsocket(). I'm not sure how to cleanly do that, but the attached
patch works around the problem in an admittedly kludgy way by delaying
the close to ensure that the newly-opened socket gets a different fd.

Daniel's added comment: I didn't spot a way to easily do a nicer fix so
I've proceeded with Ben's patch.

Bug: http://curl.haxx.se/bug/view.cgi?id=3017819
Patch by: Ben Darnell

14 years agoftp-wildcard: avoid tight loop when used without any pattern
Pavel Raiskup [Thu, 24 Jun 2010 08:10:29 +0000 (10:10 +0200)]
ftp-wildcard: avoid tight loop when used without any pattern

It was broken for URLs like "ftp://example.com/".

14 years agomaketgz: produce CHANGES automatically with the 1000 most recent commits
Daniel Stenberg [Mon, 21 Jun 2010 20:42:36 +0000 (22:42 +0200)]
maketgz: produce CHANGES automatically with the 1000 most recent commits

It passes the git log output through 'log2changes.pl' to produce
the lot.

14 years agoignore: CHANGES.dist gets generated by maketgz
Daniel Stenberg [Mon, 21 Jun 2010 20:42:11 +0000 (22:42 +0200)]
ignore: CHANGES.dist gets generated by maketgz

14 years agoCHANGES: move all contents from CHANGES to CHANGES.0
Daniel Stenberg [Mon, 21 Jun 2010 20:27:39 +0000 (22:27 +0200)]
CHANGES: move all contents from CHANGES to CHANGES.0

CHANGES is no longer used for manually edited content. It is to
be generated automatically by maketgz when we make release
tarballs.

14 years agolog2changes: correct command line, fix tag usage, change Version output
Daniel Stenberg [Mon, 21 Jun 2010 20:21:25 +0000 (22:21 +0200)]
log2changes: correct command line, fix tag usage, change Version output

--decorate=full is needed with my git 1.7.1 to get the necessary
output so that the previous edit would work to extract the
Version stuff.

... but I had to edit how the refs/tags was extracted since it
had a little flaw that made it miss the 7.20.1 output.

Finally, I changed so that Version is outputted even more similar
to how CHANGES does it.

14 years agoMake the output of log2changes.pl even more closely match CHANGES
Dan Fandrich [Mon, 21 Jun 2010 19:24:27 +0000 (12:24 -0700)]
Make the output of log2changes.pl even more closely match CHANGES

Add the ASCII art header, and list version commits by decoding
the ref tag names, when available (using the git log --decorate
option).

14 years agolog2changes: first version of the git log to CHANGES conversion script
Daniel Stenberg [Sat, 19 Jun 2010 21:08:34 +0000 (23:08 +0200)]
log2changes: first version of the git log to CHANGES conversion script

$ git log --pretty=fuller --no-color --date=short | ./log2changes.pl

Of course, limiting the log output with a range like with
"[tag]..HEAD" appended can be very useful too.

14 years agosendrecv: treat all negative values from send/recv as errors
Daniel Stenberg [Fri, 18 Jun 2010 22:18:14 +0000 (00:18 +0200)]
sendrecv: treat all negative values from send/recv as errors

For example the libssh2 based functions return other negative
values than -1 to signal errors and it is important that we catch
them properly. Right before this, various failures from libssh2
were treated as negative download amounts which caused havoc.

14 years agomulti: prevent NULL pointer dereference
Daniel Stenberg [Fri, 18 Jun 2010 21:46:09 +0000 (23:46 +0200)]
multi: prevent NULL pointer dereference

My additional call to Curl_pgrsUpdate() would sometimes get
called even though there's no connection (left) so a NULL pointer
would get passed, causing a segfault.

14 years agosmtp: fixed a few uses of size_t that seemed to believe it was signed
Daniel Stenberg [Fri, 18 Jun 2010 14:20:41 +0000 (16:20 +0200)]
smtp: fixed a few uses of size_t that seemed to believe it was signed

Reported-by: Steven M. Schweda
14 years agoFixed an OOM memory leak in the FTP wildcard code
Dan Fandrich [Thu, 17 Jun 2010 17:56:25 +0000 (10:56 -0700)]
Fixed an OOM memory leak in the FTP wildcard code

14 years agotest575: do not fail with threaded DNS resolver
Kamil Dudka [Thu, 17 Jun 2010 15:07:15 +0000 (17:07 +0200)]
test575: do not fail with threaded DNS resolver

14 years agomulti: unmark handle as used when no longer head of pipeline
Krister Johansen [Thu, 17 Jun 2010 13:46:27 +0000 (15:46 +0200)]
multi: unmark handle as used when no longer head of pipeline

14 years agomulti: call the progress function only once and allow abort
Daniel Stenberg [Thu, 17 Jun 2010 13:19:30 +0000 (15:19 +0200)]
multi: call the progress function only once and allow abort

1) no need to call the progress function twice when in the
CURLM_STATE_TOOFAST state.

2) Make sure that the progress callback's return code is
acknowledged when used

14 years agomulti: call the progress callback in all states
Daniel Stenberg [Thu, 17 Jun 2010 13:08:55 +0000 (15:08 +0200)]
multi: call the progress callback in all states

As long as no error is reported, the progress function can get
called. This may be a little TOO often so we should keep an eye
on this and possibly make this conditional somehow.

14 years agoconfigure: spell --disable-threaded-resolver correctly
Daniel Stenberg [Thu, 17 Jun 2010 13:07:05 +0000 (15:07 +0200)]
configure: spell --disable-threaded-resolver correctly

Previously we only accepted the option when named
--disable-threaded-resover, which wasn't quite intended.

Reported by: Helwing Lutz

14 years agorelease: start on 7.21.1, bump contributor count
Daniel Stenberg [Wed, 16 Jun 2010 12:29:16 +0000 (14:29 +0200)]
release: start on 7.21.1, bump contributor count

14 years agoversion: start working on the 7.21.1-dev version
Daniel Stenberg [Wed, 16 Jun 2010 12:26:43 +0000 (14:26 +0200)]
version: start working on the 7.21.1-dev version

14 years agoTHANKS: added contributors from the 7.21.0 release
Daniel Stenberg [Wed, 16 Jun 2010 12:26:14 +0000 (14:26 +0200)]
THANKS: added contributors from the 7.21.0 release

14 years agorelease: 7.21.0
Daniel Stenberg [Wed, 16 Jun 2010 11:48:27 +0000 (13:48 +0200)]
release: 7.21.0

14 years agoremove unused 'tmpdata' and 'backup' ftp_parselist_data struct members
Yang Tse [Thu, 10 Jun 2010 02:46:30 +0000 (04:46 +0200)]
remove unused 'tmpdata' and 'backup' ftp_parselist_data struct members

14 years agoreplace isprint() with ISPRINT()
Yang Tse [Thu, 10 Jun 2010 00:33:45 +0000 (02:33 +0200)]
replace isprint() with ISPRINT()

14 years agoensure that Curl_wildcard_dtor() leaves WildcardData struct zero initialized
Yang Tse [Thu, 10 Jun 2010 00:30:23 +0000 (02:30 +0200)]
ensure that Curl_wildcard_dtor() leaves WildcardData struct zero initialized

14 years agoILE/RPG binding updated to current curl.h definitions.
Patrick Monnerat [Wed, 9 Jun 2010 15:14:33 +0000 (17:14 +0200)]
ILE/RPG binding updated to current curl.h definitions.

14 years agocode simplification
Yang Tse [Wed, 9 Jun 2010 14:48:19 +0000 (16:48 +0200)]
code simplification

14 years agoadd Curl_ prefix to conform with cURL naming standards
Yang Tse [Wed, 9 Jun 2010 13:45:46 +0000 (15:45 +0200)]
add Curl_ prefix to conform with cURL naming standards

14 years agoMerge branch 'master' of git@github.com:bagder/curl
Yang Tse [Tue, 8 Jun 2010 23:57:37 +0000 (01:57 +0200)]
Merge branch 'master' of git@github.com:bagder/curl

14 years agofix compiler warning using curl_socket_t to store socket descriptor
Yang Tse [Tue, 8 Jun 2010 23:51:46 +0000 (01:51 +0200)]
fix compiler warning using curl_socket_t to store socket descriptor

14 years agoinet_pton: warnings: use size_t to store pointer deltas
Daniel Stenberg [Tue, 8 Jun 2010 21:09:42 +0000 (23:09 +0200)]
inet_pton: warnings: use size_t to store pointer deltas

14 years agoavoid redundant work when reusing same connection
Yang Tse [Tue, 8 Jun 2010 17:29:20 +0000 (19:29 +0200)]
avoid redundant work when reusing same connection

14 years agofix function result checking
Yang Tse [Tue, 8 Jun 2010 14:16:34 +0000 (16:16 +0200)]
fix function result checking

14 years agotransfer: warning: implicit conversion
Daniel Stenberg [Tue, 8 Jun 2010 08:36:06 +0000 (10:36 +0200)]
transfer: warning: implicit conversion

There is an implicit conversion from "unsigned long" to "long";
rounding, sign extension, or loss of accuracy may result.

Fixed by an added typecast.

14 years agoTFTP: fix compiler warning
Daniel Stenberg [Tue, 8 Jun 2010 08:35:06 +0000 (10:35 +0200)]
TFTP: fix compiler warning

Curl_fillreadbuffer()'s second argument takes an int, so
typecasting to another is a bad idea.

14 years agoTFTP: fix warning for sendto() usage on non-POSIX systems
Daniel Stenberg [Tue, 8 Jun 2010 08:19:39 +0000 (10:19 +0200)]
TFTP: fix warning for sendto() usage on non-POSIX systems

Older unixes want an 'int' instead of 'size_t' as the 3rd
argumment so before this change it would cause warnings such as:

There is an implicit conversion from "unsigned long" to "int";
rounding, sign extension, or loss of accuracy may result.

14 years agoInclude Makefile.inc to get the list of source files for Amiga
Dan Fandrich [Mon, 7 Jun 2010 21:00:16 +0000 (14:00 -0700)]
Include Makefile.inc to get the list of source files for Amiga

Signed-off-by: Diego Casorran <dcasorran@gmail.com>
14 years agoCurl_updateconninfo() error handling fix
Yang Tse [Mon, 7 Jun 2010 14:53:31 +0000 (16:53 +0200)]
Curl_updateconninfo() error handling fix

14 years agoOpenSSL: fix spurious SSL connection aborts
Constantine Sapuntzakis [Sat, 5 Jun 2010 21:41:58 +0000 (23:41 +0200)]
OpenSSL: fix spurious SSL connection aborts

Was seeing spurious SSL connection aborts using libcurl and
OpenSSL. I tracked it down to uncleared error state on the
OpenSSL error stack - patch attached deals with that.

Rough idea of problem:

Code that uses libcurl calls some library that uses OpenSSL but
don't clear the OpenSSL error stack after an error.

ssluse.c calls SSL_read which eventually gets an EWOULDBLOCK from
the OS. Returns -1 to indicate an error

ssluse.c calls SSL_get_error. First thing, SSL_get_error calls
ERR_get_error to check the OpenSSL error stack, finds an old
error and returns SSL_ERROR_SSL instead of SSL_ERROR_WANT_READ or
SSL_ERROR_WANT_WRITE.

ssluse.c returns an error and aborts the connection

Solution:

Clear the openssl error stack before calling SSL_* operation if
we're going to call SSL_get_error afterwards.

Notes:

This is much more likely to happen with multi because it's easier
to intersperse other calls to the OpenSSL library in the same
thread.

14 years agoreplace socklen_t with curl_socklen_t
Yang Tse [Sat, 5 Jun 2010 13:08:26 +0000 (15:08 +0200)]
replace socklen_t with curl_socklen_t

14 years agogetinfo: added *_PRIMARY_PORT, *_LOCAL_IP and *_LOCAL_PORT
Frank Meier [Fri, 4 Jun 2010 22:29:09 +0000 (00:29 +0200)]
getinfo: added *_PRIMARY_PORT, *_LOCAL_IP and *_LOCAL_PORT

14 years agoRELEASE-NOTES: add contributors not mentioned
Daniel Stenberg [Fri, 4 Jun 2010 14:13:05 +0000 (16:13 +0200)]
RELEASE-NOTES: add contributors not mentioned

14 years agoEnable OpenLDAP support for cygwin builds.
Yang Tse [Fri, 4 Jun 2010 13:14:31 +0000 (15:14 +0200)]
Enable OpenLDAP support for cygwin builds.

Enable OpenLDAP support for cygwin builds. This support was disabled back
in 2008 due to incompatibilities between OpenSSL and OpenLDAP headers.
cygwin's OpenSSL 0.9.8l and OpenLDAP 2.3.43 versions on cygwin 1.5.25
allow building an OpenLDAP enabled libcurl supporting back to Windows 95.

Remove non-functional CURL_LDAP_HYBRID code and references.

14 years agoftplistparser.c: oops, fix typo in the last commit
Kamil Dudka [Wed, 2 Jun 2010 21:55:45 +0000 (23:55 +0200)]
ftplistparser.c: oops, fix typo in the last commit

14 years agoftplistparser.c: avoid some invalid dereferences
Kamil Dudka [Wed, 2 Jun 2010 21:22:38 +0000 (23:22 +0200)]
ftplistparser.c: avoid some invalid dereferences

14 years agolib: eliminate some dead code
Kamil Dudka [Wed, 2 Jun 2010 21:11:59 +0000 (23:11 +0200)]
lib: eliminate some dead code

14 years agoSSH: corrected the inability to respect the timeout
Daniel Stenberg [Wed, 2 Jun 2010 21:33:51 +0000 (23:33 +0200)]
SSH: corrected the inability to respect the timeout

Jason McDonald posted bug report #3006786 when he found that the
SFTP code didn't timeout properly in several places in the code
even if a timeout was set properly.

Based on his suggested patch, I wrote a different implementation
that I think addressed the issue better and also uses the connect
timeout for the initial part of the SSH/SFTP done during the
"protocol connect" phase.

(http://curl.haxx.se/bug/view.cgi?id=3006786)

14 years agomention last changes
Yang Tse [Wed, 2 Jun 2010 15:30:45 +0000 (17:30 +0200)]
mention last changes

14 years agoadd missing new files to non-configure target build files
Yang Tse [Wed, 2 Jun 2010 13:09:39 +0000 (15:09 +0200)]
add missing new files to non-configure target build files

14 years agoinclude libcurl standard internal headers
Yang Tse [Wed, 2 Jun 2010 12:13:02 +0000 (14:13 +0200)]
include libcurl standard internal headers

14 years agoTODO: add multi interface improvement remove ldap select
Daniel Stenberg [Wed, 2 Jun 2010 11:52:25 +0000 (13:52 +0200)]
TODO: add multi interface improvement remove ldap select

14 years agomake setup.h first included file
Yang Tse [Wed, 2 Jun 2010 11:19:04 +0000 (13:19 +0200)]
make setup.h first included file

14 years agofix spnego memory leak
Yang Tse [Wed, 2 Jun 2010 10:44:46 +0000 (12:44 +0200)]
fix spnego memory leak

14 years agoopenldap header inclusions fix
Yang Tse [Wed, 2 Jun 2010 09:23:30 +0000 (11:23 +0200)]
openldap header inclusions fix

14 years agomulti_socket: handles timer inaccuracy better for timeouts
Daniel Stenberg [Tue, 1 Jun 2010 21:18:34 +0000 (23:18 +0200)]
multi_socket: handles timer inaccuracy better for timeouts

Igor Novoseltsev reported a problem with the multi socket API and
using timeouts and timers. It boiled down to a problem with
libcurl's use of GetTickCount() interally to figure out the
current time, while Igor's own application code used another
function call.

It made his app call the socket API timeout function a bit
_before_ libcurl would consider the timeout to trigger, and that
could easily lead to timeouts or stalls in the app. It seems
GetTickCount() in general often has no better resolution than
16ms and switching to the alternative function
QueryPerformanceCounter has its share of problems:
http://www.virtualdub.org/blog/pivot/entry.php?id=106

We address this problem by simply having libcurl treat timers
that already has occured or will occur within 40ms subject for
treatment. I'm confident that there are other implementations and
operating systems with similarly in accurate timer functions so
it makes sense to have applied generically and I don't believe we
sacrifice much by adding a 40ms inaccuracy on these timeouts.

14 years agofix ldaps option issue
Yang Tse [Tue, 1 Jun 2010 19:26:19 +0000 (21:26 +0200)]
fix ldaps option issue

14 years agofix ldap related compilation issues
Yang Tse [Tue, 1 Jun 2010 15:25:03 +0000 (17:25 +0200)]
fix ldap related compilation issues

14 years agofix compiler warning: enumerated type mixed with another type
Yang Tse [Tue, 1 Jun 2010 10:25:14 +0000 (12:25 +0200)]
fix compiler warning: enumerated type mixed with another type

14 years agofix compiler warning: enumerated type mixed with another type
Yang Tse [Mon, 31 May 2010 17:55:22 +0000 (19:55 +0200)]
fix compiler warning: enumerated type mixed with another type

14 years agosmtp_authenticate: avoid compiler warnings
Patrick Monnerat [Mon, 31 May 2010 15:25:55 +0000 (17:25 +0200)]
smtp_authenticate: avoid compiler warnings

14 years agofix compiler warning: enumerated type mixed with another type
Yang Tse [Mon, 31 May 2010 15:34:28 +0000 (17:34 +0200)]
fix compiler warning: enumerated type mixed with another type

14 years agofix compiler warning: enumerated type mixed with another type
Yang Tse [Mon, 31 May 2010 15:22:43 +0000 (17:22 +0200)]
fix compiler warning: enumerated type mixed with another type

14 years agofix compiler warning: enumerated type mixed with another type
Yang Tse [Mon, 31 May 2010 15:11:51 +0000 (17:11 +0200)]
fix compiler warning: enumerated type mixed with another type

14 years agofix compiler warning: external declaration in primary source file
Yang Tse [Mon, 31 May 2010 14:58:24 +0000 (16:58 +0200)]
fix compiler warning: external declaration in primary source file