platform/upstream/curl.git
12 years agomulti: handle timeouts on DNS servers by checking for new sockets
Jason Glasgow [Wed, 30 Nov 2011 20:23:44 +0000 (15:23 -0500)]
multi: handle timeouts on DNS servers by checking for new sockets

If the first name server is not available, the multi interface does
not invoke the socket_cb when the DNS request to the first name server
timesout.  Ensure that the list of sockets are always updated after
calling Curl_resolver_is_resolved.

This bug can be reproduced if Curl is complied with --enable_ares and
your code uses the multi socket interfaces and the
CURLMOPT_SOCKETFUNCTION option.  To test try:
  iptables -I INPUT \
           -s $(sed -n -e '/name/{s/.* //p;q}' /etc/resolv.conf)/32 \
           -j REJECT
and then run a program which uses the multi-interface.

12 years agotest 815: verify POP3 dot-first-on-line unescaping
Daniel Stenberg [Thu, 1 Dec 2011 09:20:42 +0000 (10:20 +0100)]
test 815: verify POP3 dot-first-on-line unescaping

12 years agoPOP3: fixed escaped dot not being striped out
Steve Holme [Wed, 30 Nov 2011 18:23:09 +0000 (18:23 +0000)]
POP3: fixed escaped dot not being striped out

Changed the eob detection to work across the whole of the buffer so that
lines that begin with a dot (which the server will have escaped) are
passed to the client application correctly.

12 years agobuildconf: follow-up for commit 7e02f7fd
Yang Tse [Wed, 30 Nov 2011 20:53:21 +0000 (21:53 +0100)]
buildconf: follow-up for commit 7e02f7fd

12 years agobuildconf: fix libtool 1.5.x warnings triggered with autoconf 2.6x or later
Yang Tse [Wed, 30 Nov 2011 18:31:50 +0000 (19:31 +0100)]
buildconf: fix libtool 1.5.x warnings triggered with autoconf 2.6x or later

Using libtool 1.5.x (x < 26) with autoconf 2.6x or later generates warnings
due to some libtool variables not following naming convention for variables
that will be cached.

This is addressed renaming a couple of variables to make these follow expected
naming convention.

12 years agoRELEASE-NOTES: synced with 1038d0aa1
Daniel Stenberg [Wed, 30 Nov 2011 15:38:58 +0000 (16:38 +0100)]
RELEASE-NOTES: synced with 1038d0aa1

5 bugfixes and 1 new contributor

12 years agopop3.c: fix compiler warning
Yang Tse [Tue, 29 Nov 2011 19:28:49 +0000 (20:28 +0100)]
pop3.c: fix compiler warning

12 years agoconfigure: avoid usage of macro PKG_CHECK_MODULES
Yang Tse [Tue, 29 Nov 2011 18:11:34 +0000 (19:11 +0100)]
configure: avoid usage of macro PKG_CHECK_MODULES

libidn option adjusted in order to use pkg-config info when available
in a similar way as we already do for other libraries.

12 years agoPOP3: detect when LIST returns no mails
Daniel Stenberg [Tue, 29 Nov 2011 12:43:46 +0000 (13:43 +0100)]
POP3: detect when LIST returns no mails

By making sure the function can detect an "end of body" sequence
immediately on the first line, test 811 is now enabled.

12 years agoftpserver: output CRLF in logs
Daniel Stenberg [Tue, 29 Nov 2011 12:41:10 +0000 (13:41 +0100)]
ftpserver: output CRLF in logs

Previously the log function would just filter out all CR and LF
occurances from the log to make it more readable. This had the downside
that it made it very hard to see CR LFs when they actually matters.

Now, they're instead converted to "[CR]" and "[LR]" in the log to become
apparent to readers.

12 years agoPOP3: fix end of body detection
Daniel Stenberg [Mon, 28 Nov 2011 22:02:35 +0000 (23:02 +0100)]
POP3: fix end of body detection

Curl_pop3_write() now has a state machine that scans for the end of a
POP3 body so that the CR LF '.' CR LF sequence can come in everything
from one up to five subsequent packets.

Test case 810 is modified to use SLOWDOWN which makes the server pause
between each single byte and thus makes the POP3 body get sent to curl
basically one byte at a time.

12 years agotest: added POP3 test with dot-prefixed line
Daniel Stenberg [Mon, 28 Nov 2011 22:34:16 +0000 (23:34 +0100)]
test: added POP3 test with dot-prefixed line

Test 815 is disabled for now since libcurl currently doesn't unescape
such lines the way it should. See mail:

http://curl.haxx.se/mail/lib-2011-11/0324.html

12 years agoconfigure: fix to make older pkg-config play well
Daniel Stenberg [Sun, 27 Nov 2011 19:00:30 +0000 (20:00 +0100)]
configure: fix to make older pkg-config play well

configure.ac:1349: error: possibly undefined macro: PKG_CONFIG_LIBDIR

Obviously this is not a problem with pkg-config 0.26 but older versions
seem to show this.

Fix suggested by: Kamil Dudka
Reported by: Guenter
Bug: http://curl.haxx.se/mail/lib-2011-11/0298.html

12 years agotest 1211: FTP test to repeat bug #3429299
Daniel Stenberg [Fri, 25 Nov 2011 22:15:58 +0000 (23:15 +0100)]
test 1211: FTP test to repeat bug #3429299

"Active FTP hangs if server does not open data connection"

The server first sends a 150 and then when libcurl waits for the data
transfer, the server sends a 425.

12 years agoconfigure: add support for pkg-config detection of libidn
Mark Brand [Fri, 25 Nov 2011 22:00:16 +0000 (23:00 +0100)]
configure: add support for pkg-config detection of libidn

12 years agoFTP tests 1206 - 1209: don't expect QUIT
Daniel Stenberg [Fri, 25 Nov 2011 21:38:13 +0000 (22:38 +0100)]
FTP tests 1206 - 1209: don't expect QUIT

The protocol parts for these tests do not include QUIT simply because
the error is CURLE_OPERATION_TIMEDOUT (28) which is a generic timeout
error without specificly saying for which connection it concerns, and
for timeouts libcurl marks the control channel as "invalid". As this
test case times out for the data connection it could still use the
control channel.

12 years agoCyaSSL 2.0+ library initialization adjustment
Yang Tse [Fri, 25 Nov 2011 16:23:36 +0000 (17:23 +0100)]
CyaSSL 2.0+ library initialization adjustment

12 years agorectify comment
Jonas Schnelli [Fri, 25 Nov 2011 14:02:43 +0000 (15:02 +0100)]
rectify comment

12 years agoSSLSESSION_SHARED: new macro to check if session is shared
Daniel Stenberg [Fri, 25 Nov 2011 13:58:55 +0000 (14:58 +0100)]
SSLSESSION_SHARED: new macro to check if session is shared

Added convenience macro to use to check if a handle is using a shared
SSL session, and fixed so that Curl_ssl_close_all() doesn't lock when
the session isn't shared.

12 years agotelnet.c: fix MSVC compiler warning
Yang Tse [Fri, 25 Nov 2011 13:30:53 +0000 (14:30 +0100)]
telnet.c: fix MSVC compiler warning

12 years agotvdiff_secs(): sub-zero time difference adjustment
Yang Tse [Fri, 25 Nov 2011 12:51:55 +0000 (13:51 +0100)]
tvdiff_secs(): sub-zero time difference adjustment

Skip a floating point addition operation when integral part of time difference
is zero. This avoids potential floating point addition rounding problems while
preserving decimal part value.

12 years agotelnet: fix macros to allow proper semicolon use
Daniel Stenberg [Fri, 25 Nov 2011 09:56:18 +0000 (10:56 +0100)]
telnet: fix macros to allow proper semicolon use

Macros that look like function calls need to be made so that we can use
semicolons properly for indentation and for reducing the risk for
mistakes when using them.

12 years agoTELNET: improved treatment of options
Laurent Rabret [Fri, 25 Nov 2011 09:35:34 +0000 (10:35 +0100)]
TELNET: improved treatment of options

1) enables the Window Size option
2) allows the server to enable the echo mode
3) allows an app using libcurl to disable the default binary mode

Signed-off-by: Laurent Rabret
12 years agoRELEASE-NOTES: synced with 2c905fd1f82
Daniel Stenberg [Thu, 24 Nov 2011 23:09:43 +0000 (00:09 +0100)]
RELEASE-NOTES: synced with 2c905fd1f82

12 years agoquery-part: ignore the URI part for given protocols
Jonas Schnelli [Thu, 24 Nov 2011 22:28:54 +0000 (23:28 +0100)]
query-part: ignore the URI part for given protocols

By setting PROTOPT_NOURLQUERY in the protocol handler struct, the
protocol will get the "query part" of the URL cut off before the data is
handled by the protocol-specific code. This makes libcurl adhere to
RFC3986 section 2.2.

Test 1220 is added to verify a file:// URL with query-part.

12 years agosymbols.pl: provide LIBCURL_HAS macro for apps
Daniel Stenberg [Thu, 24 Nov 2011 21:55:09 +0000 (22:55 +0100)]
symbols.pl: provide LIBCURL_HAS macro for apps

Experience has shown that the symbols-in-versions file is very useful to
applications that want to build with a wide range of libcurl versions.
It is however easy to get it wrong and the source gets a bit messy with
all the fixed numerical comparisions.

The point of this script is to provide an easy-to-use macro for libcurl-
using applications to do preprocessor checks for specific libcurl
defines, and yet make the code clearly show what the macro is used for.

12 years agolib573.c: fix double data type variable comparison with zero
Yang Tse [Thu, 24 Nov 2011 17:18:42 +0000 (18:18 +0100)]
lib573.c: fix double data type variable comparison with zero

12 years agogetinfo.c: reset app connect time when clearing session-info time variables
Yang Tse [Thu, 24 Nov 2011 17:13:09 +0000 (18:13 +0100)]
getinfo.c: reset app connect time when clearing session-info time variables

12 years agoFix unreleased regression when using windows gnutls versions older than 2.8
Yang Tse [Thu, 24 Nov 2011 11:11:52 +0000 (12:11 +0100)]
Fix unreleased regression when using windows gnutls versions older than 2.8

12 years agognutls: only translate winsock errors for old versions
Mark Brand [Tue, 22 Nov 2011 21:48:15 +0000 (22:48 +0100)]
gnutls: only translate winsock errors for old versions

Bugfix: https handshake fails using gnutls 3 on windows
http://sourceforge.net/tracker/index.php?func=detail&aid=3441084&group_id=976&atid=100976

New gnutls versions have an error handler that knows about Winsock
errors, which is why gnutls_transport_set_global_errno() was deprecated
and then removed.

This is a correction of commit f5bb370 (blame me) which meant to
reimplement gnutls_transport_set_global_errno(), which is not necessary.

12 years agoprotocol_connect: show verbose connect and set connect time
Daniel Stenberg [Mon, 21 Nov 2011 22:36:21 +0000 (23:36 +0100)]
protocol_connect: show verbose connect and set connect time

Regression: commit b998d95b (shipped first in release 7.22.0) made the
condition always equal false that should reset the TIMER_CONNECT timer
and call the Curl_verboseconnect() function.

Reported by: "Captain Basil"
Bug: http://curl.haxx.se/mail/archive-2011-11/0035.html

12 years ago-J -O: use -O name if no Content-Disposition header comes!
Daniel Stenberg [Sun, 20 Nov 2011 22:33:46 +0000 (23:33 +0100)]
-J -O: use -O name if no Content-Disposition header comes!

A regression between 7.22.0 and 7.23.0 -- downloading a file with the
flags -O and -J results in the content being written to stdout if and
only if there was no Content-Disposition header in the http response. If
there is a C-D header with a filename attribute, the output is correctly
written.

Reported by: Dave Reisner
Bug: http://curl.haxx.se/mail/archive-2011-11/0030.html

12 years agoAdd support for using nettle instead of gcrypt as gnutls backend
Martin Storsjo [Tue, 15 Nov 2011 09:52:32 +0000 (11:52 +0200)]
Add support for using nettle instead of gcrypt as gnutls backend

12 years agotest: SFTP quote commands with * prefix
Jonas Schnelli [Fri, 18 Nov 2011 19:30:46 +0000 (20:30 +0100)]
test: SFTP quote commands with * prefix

Related to the f64812ca63 commit

12 years agoCURLOPT_QUOTE: SFTP supports the '*'-prefix now
Daniel Stenberg [Fri, 18 Nov 2011 19:27:07 +0000 (20:27 +0100)]
CURLOPT_QUOTE: SFTP supports the '*'-prefix now

12 years agoSFTP: support '*' prefix for quote operations
Jonas Schnelli [Fri, 18 Nov 2011 14:55:09 +0000 (15:55 +0100)]
SFTP: support '*' prefix for quote operations

prefixing a command with '*' means it is allowed to fail without
aborting the chain actions

12 years agogetsessionid: don't ever return while locked
Daniel Stenberg [Thu, 17 Nov 2011 22:55:36 +0000 (23:55 +0100)]
getsessionid: don't ever return while locked

Also, check for the session sharing bit instead of comparing pointers

12 years agoCurl_ssl_getsessionid: increase the value, not the pointer
Daniel Stenberg [Thu, 17 Nov 2011 22:46:29 +0000 (23:46 +0100)]
Curl_ssl_getsessionid: increase the value, not the pointer

12 years agoTHANKS: one new contributor in 7.23.1
Daniel Stenberg [Thu, 17 Nov 2011 22:43:38 +0000 (23:43 +0100)]
THANKS: one new contributor in 7.23.1

12 years agoSSL session share: move the age counter to the share object
Alejandro Alvarez Ayllon [Thu, 17 Nov 2011 22:34:38 +0000 (23:34 +0100)]
SSL session share: move the age counter to the share object

Previously the age counter would be counted individually in each easy
handle that shared SSL sessions!

12 years agolibtest build: add the missing lib586
Alejandro Alvarez Ayllon [Thu, 17 Nov 2011 22:33:42 +0000 (23:33 +0100)]
libtest build: add the missing lib586

12 years agoCURLOPT_DNS_SERVERS: set name servers if possible
Jason Glasgow [Tue, 12 Apr 2011 15:34:28 +0000 (11:34 -0400)]
CURLOPT_DNS_SERVERS: set name servers if possible

12 years agoRELEASE-NOTES: correct the release and contributor numbers
Daniel Stenberg [Thu, 17 Nov 2011 17:29:15 +0000 (18:29 +0100)]
RELEASE-NOTES: correct the release and contributor numbers

12 years agoFindWin32CACert: return OK even if CA cert isn't found
Daniel Stenberg [Thu, 17 Nov 2011 17:03:21 +0000 (18:03 +0100)]
FindWin32CACert: return OK even if CA cert isn't found

Bug: http://curl.haxx.se/mail/lib-2011-11/0180.html
Reported by: Mark Brand

12 years agocurl has been built on many Android versions
Dan Fandrich [Thu, 17 Nov 2011 01:11:31 +0000 (17:11 -0800)]
curl has been built on many Android versions

12 years ago7.24.0: start the work
Daniel Stenberg [Tue, 15 Nov 2011 19:44:49 +0000 (20:44 +0100)]
7.24.0: start the work

12 years agoTHANKS: added 18 new contributors from 7.23.0
Daniel Stenberg [Tue, 15 Nov 2011 19:44:24 +0000 (20:44 +0100)]
THANKS: added 18 new contributors from 7.23.0

12 years agocurl_easy_setopt arguments should be of type long in the examples
Dan Fandrich [Mon, 14 Nov 2011 22:03:31 +0000 (14:03 -0800)]
curl_easy_setopt arguments should be of type long in the examples

12 years agoRELEASE-NOTES: synced with 10120e6a
Daniel Stenberg [Sat, 12 Nov 2011 09:09:54 +0000 (10:09 +0100)]
RELEASE-NOTES: synced with 10120e6a

one more bug fix and contributor

12 years agoprogress_cb: avoid buffer overflow
Daniel Stenberg [Wed, 9 Nov 2011 21:50:36 +0000 (22:50 +0100)]
progress_cb: avoid buffer overflow

The progress bar output function would blindly use the terminal width
without bounds checking. When using a very wide terminal that caused a
buffer overflow and segfault.

We now limit the max bar with to 255 columns, and I simplified the code
to avoid an extra snprintf and buffer.

Bug: http://curl.haxx.se/bug/view.cgi?id=3435710
Reported by: Alexey Zakhlestin

12 years agoActive mode FTP test cases with server not establishing data connection
Yang Tse [Fri, 11 Nov 2011 18:46:44 +0000 (19:46 +0100)]
Active mode FTP test cases with server not establishing data connection

591 -> FTP multi PORT and 425 on upload
592 -> FTP multi PORT and 421 on upload
593 -> FTP multi PORT upload, no data conn and no transient neg. reply
594 -> FTP multi PORT upload, no data conn and no positive prelim. reply

1206 -> FTP PORT and 425 on download
1207 -> FTP PORT and 421 on download
1208 -> FTP PORT download, no data conn and no transient negative reply
1209 -> FTP PORT download, no data conn and no positive preliminary reply

12 years agoFix to skip untrusted certs.
Guenter Knauf [Tue, 8 Nov 2011 04:46:46 +0000 (05:46 +0100)]
Fix to skip untrusted certs.

12 years agoRELEASE-NOTES: synced with e3166df1bb3
Daniel Stenberg [Sun, 6 Nov 2011 22:42:28 +0000 (23:42 +0100)]
RELEASE-NOTES: synced with e3166df1bb3

4 new bugfixes, 2 more contributors

12 years agoftp PORT: don't hang if bind() fails
Daniel Stenberg [Sun, 6 Nov 2011 15:53:07 +0000 (16:53 +0100)]
ftp PORT: don't hang if bind() fails

When the user requests PORT with a specific port or port range, the code
could lock up in an endless loop. There's now an extra conditional that
makes sure to special treat the error and try the local address only
once so a second failure will abort the loop correctly.

Bug: http://curl.haxx.se/bug/view.cgi?id=3433968
Reported by: Gokhan Sengun

12 years agopingpong: change two comments wrongly referring "FTP"
Daniel Stenberg [Sun, 6 Nov 2011 16:38:36 +0000 (17:38 +0100)]
pingpong: change two comments wrongly referring "FTP"

Just a sign of where the code originally was ripped out from. Now it is
generic "pingpong".

12 years agotest 590: verify the bug fix in 4851dafcf1
Daniel Stenberg [Sun, 6 Nov 2011 16:28:28 +0000 (17:28 +0100)]
test 590: verify the bug fix in 4851dafcf1

This test is created to verify Rene Bernhardt's patch which makes sure
libcurl properly _not_ deals with Negotiate if not asked to even if the
proxy says it can serve it.

12 years agoHTTP auth: fix proxy Negotiate bug
Rene Bernhardt [Thu, 3 Nov 2011 22:25:17 +0000 (23:25 +0100)]
HTTP auth: fix proxy Negotiate bug

If a proxy offers several Authentication schemes where NTLM and
Negotiate are offered by the proxy and you tell libcurl not to use the
Negotiate scheme then the request never returns when the proxy answers
with its HTTP 407 reply.

It is reproducible by the following steps:

- Use a proxy that offers NTLM and Negotiate ( CURLOPT_PROXY and
CURLOPT_PROXYPORT )

- Tell libcurl NOT to use Negotiate CURL_EASY_SETOPT(CURLOPT_PROXYAUTH,
CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM )

- Start the request

The call to CURL_EASY_PERFORM never returns. If you switch on debug
logging you can see that libcurl issues a new request As soon as it
received the 407 reply. Instead it should return and set the response
code to 407.

Bug: http://curl.haxx.se/mail/lib-2011-10/0323.html

12 years agossluse.c: fix calling of OpenSSL's ERR_remove_state(0)
Yang Tse [Fri, 4 Nov 2011 12:08:37 +0000 (13:08 +0100)]
ssluse.c: fix calling of OpenSSL's ERR_remove_state(0)

Move calling of ERR_remove_state(0) a.k.a ERR_remove_thread_state(NULL)
from Curl_ossl_close_all() to Curl_ossl_cleanup().

In this way ERR_remove_state(0) is now only called in libcurl by
curl_global_cleanup(). Previously it would get called by functions
curl_easy_cleanup(), curl_multi_cleanup and potentially each time a
connection was removed from a connection cache leading to premature
destruction of OpenSSL's thread local state hash.

Multi-threaded apps using OpenSSL enabled libcurl should still call
function ERR_remove_state(0) or ERR_remove_thread_state(NULL) at the
very end end of threads that do not call curl_global_cleanup().

12 years agotool_cb_wrt.c: disambiguate warning message
Yang Tse [Thu, 3 Nov 2011 22:26:38 +0000 (23:26 +0100)]
tool_cb_wrt.c: disambiguate warning message

12 years agotool_cfgable.c: pending check done
Yang Tse [Thu, 3 Nov 2011 22:21:01 +0000 (23:21 +0100)]
tool_cfgable.c: pending check done

12 years agourl.c and file.c: fix OOM triggered segfault
Yang Tse [Thu, 3 Nov 2011 20:56:51 +0000 (21:56 +0100)]
url.c and file.c: fix OOM triggered segfault

12 years agorename ftp_ssl: the struct field is used for many protocols
Daniel Stenberg [Thu, 3 Nov 2011 08:54:12 +0000 (09:54 +0100)]
rename ftp_ssl: the struct field is used for many protocols

Now called 'use_ssl' instead, which better matches the current CURLOPT
name and since the option is used for all pingpong protocols (at least)
it makes sense to not use 'ftp' in the name.

12 years agogtls_connect_step1: remove use of deprecated functions
Daniel Stenberg [Wed, 2 Nov 2011 21:44:22 +0000 (22:44 +0100)]
gtls_connect_step1: remove use of deprecated functions

Use gnutls_priority_set_direct() instead of gnutls_protocol_set_priority().

Remove the gnutls_certificate_type_set_priority() use since x509 is the
default certificate type anyway.

Reported by: Vincent Torri

12 years agourl.c and transfer.c: nullify connection pointer when free()'ed
Yang Tse [Wed, 2 Nov 2011 21:34:41 +0000 (22:34 +0100)]
url.c and transfer.c: nullify connection pointer when free()'ed

12 years agoFTP test server: NODATACONN commands follow-up
Yang Tse [Wed, 2 Nov 2011 12:38:31 +0000 (13:38 +0100)]
FTP test server: NODATACONN commands follow-up

Make NODATACONN425 and NODATACONN421 return a 150 positive preliminary reply
before 425 or 421.

New NODATACONN150 returns 150 without further positive nor negative reply

Now NODATACONN doesn't reply anything at all.

12 years agomulti.c: OOM handling fix
Yang Tse [Tue, 1 Nov 2011 13:38:21 +0000 (14:38 +0100)]
multi.c: OOM handling fix

12 years agoFTP test server: NODATACONN commands follow-up
Yang Tse [Tue, 1 Nov 2011 13:11:36 +0000 (14:11 +0100)]
FTP test server: NODATACONN commands follow-up

Make NODATACONN custom commands apply to both active and passive FTP,
and ensure 425 and 421 are not returned unless data channel usage is
attempted.

12 years agotool_cb_see.h: fix compiler warning
Yang Tse [Tue, 1 Nov 2011 11:53:23 +0000 (12:53 +0100)]
tool_cb_see.h: fix compiler warning

12 years agosetup.h: fix compiler warning
Yang Tse [Mon, 31 Oct 2011 21:42:43 +0000 (22:42 +0100)]
setup.h: fix compiler warning

12 years agoFTP test server: NODATACONN commands commit c761fcb0 follow-up
Yang Tse [Mon, 31 Oct 2011 06:29:13 +0000 (07:29 +0100)]
FTP test server: NODATACONN commands commit c761fcb0 follow-up

Adjustments that make NODATACONN custom commands fully usable.

12 years agodoc/curl.1: fix sentence with ending for -# option
Dave Reisner [Sun, 30 Oct 2011 03:28:11 +0000 (04:28 +0100)]
doc/curl.1: fix sentence with ending for -# option

Try to be a little more descriptive about the effect of this flag,
rather than parroting what was said in the paragraph just above.

12 years agoFTP test server: fix server unresponsiveness
Yang Tse [Sun, 30 Oct 2011 16:12:20 +0000 (17:12 +0100)]
FTP test server: fix server unresponsiveness

Some torture tests left FTP test server in an unresponsive state, resulting
in torture tests that actually completed following unexpected code paths.

Changes in this commit solely address this issue and some adjustments for
ftpserver.pl logging relative to data channel establishment and tear down.
Pending NODATACONN relative adjustments reserved for a further commit.

12 years agoruntests.pl: running server checks - commit 4464583a follow-up
Yang Tse [Sun, 30 Oct 2011 15:45:14 +0000 (16:45 +0100)]
runtests.pl: running server checks - commit 4464583a follow-up

Ensure verification takes place with no server commands file.
Ignore verbose setting for running server precheck.
Tweak unresponsive server message, to allow detection by haxx.se scripts.

12 years agogtls.c: gnutls_transport_set_global_errno() deprecated in version 2.12.3
Yang Tse [Sat, 29 Oct 2011 12:58:50 +0000 (14:58 +0200)]
gtls.c: gnutls_transport_set_global_errno() deprecated in version 2.12.3

12 years agoruntests.pl: running server checks - commit 3676ec96 follow-up
Yang Tse [Fri, 28 Oct 2011 13:59:36 +0000 (15:59 +0200)]
runtests.pl: running server checks - commit 3676ec96 follow-up

Fix called sub when checking TFTP server, and adjust message.

12 years agoruntests.pl: running server checks - commit 4464583a follow-up
Yang Tse [Thu, 27 Oct 2011 22:05:16 +0000 (00:05 +0200)]
runtests.pl: running server checks - commit 4464583a follow-up

Extended server checks to others in addition to pingpong when torture testing.

12 years agolib589.c: add CURLOPT_READDATA missing stuff
Yang Tse [Thu, 27 Oct 2011 20:00:23 +0000 (22:00 +0200)]
lib589.c: add CURLOPT_READDATA missing stuff

12 years agoftpserver.pl: three new custom FTP server commands to disable data channel
Yang Tse [Thu, 27 Oct 2011 19:46:24 +0000 (21:46 +0200)]
ftpserver.pl: three new custom FTP server commands to disable data channel

NODATACONN421: applies only to active FTP mode, instructs server to not
establish data connection back to client and reply with FTP 421.

NODATACONN425: applies only to active FTP mode, instructs server to not
establish data connection back to client and reply with FTP 425.

NODATACONN: applies to both active and passive FTP modes, instructs server
to not establish nor accept a data channel and fool client into believing
that the data channel connection is possible.

Some polishing probably required.

12 years agomulti.c: OOM handling fix
Yang Tse [Thu, 27 Oct 2011 15:08:02 +0000 (17:08 +0200)]
multi.c: OOM handling fix

Fix curl_multi_cleanup() segfault when using weird cleanup sequence.

12 years agomulti: start ftp state machine when switching to DO_MORE
Daniel Stenberg [Thu, 27 Oct 2011 10:46:29 +0000 (12:46 +0200)]
multi: start ftp state machine when switching to DO_MORE

This extends the fix from commit d7934b8bd491

When the multi state is changed within the multi_runsingle from DOING to
DO_MORE, we didn't immediately start the FTP state machine again. That
then left the FTP state in FTP_STOP. When curl_multi_fdset() was
subsequently called, the ftp_domore_getsock() function would return the
wrong fd info.

Reported by: Gokhan Sengun

12 years agolibcurl-multi.3: update the list of areas still blocking
Daniel Stenberg [Thu, 27 Oct 2011 07:22:15 +0000 (09:22 +0200)]
libcurl-multi.3: update the list of areas still blocking

12 years agotest 589: active FTP upload using multi timeout and EPRT disabled server
Yang Tse [Wed, 26 Oct 2011 16:55:35 +0000 (18:55 +0200)]
test 589: active FTP upload using multi timeout and EPRT disabled server

12 years agomulti tests: OOM handling fixes - commit 629d2e34 follow-up
Yang Tse [Wed, 26 Oct 2011 16:46:32 +0000 (18:46 +0200)]
multi tests: OOM handling fixes - commit 629d2e34 follow-up

12 years ago- Prepare the ILE/RPG binding and OS400 documentation for the upcoming release
Patrick Monnerat [Wed, 26 Oct 2011 12:48:20 +0000 (14:48 +0200)]
- Prepare the ILE/RPG binding and OS400 documentation for the upcoming release

12 years agoRELEASE-NOTES: synced with 4464583a6ed
Daniel Stenberg [Tue, 25 Oct 2011 21:28:30 +0000 (23:28 +0200)]
RELEASE-NOTES: synced with 4464583a6ed

5 more bug fixes, 4 additional contributors

12 years agoruntests.pl: running server checks
Yang Tse [Tue, 25 Oct 2011 21:19:36 +0000 (23:19 +0200)]
runtests.pl: running server checks

When running torture tests, verify before each test case that required
pingpong servers which are supposed to be alive are actually responsive.
If found not responsive then restart them.

12 years agodist: add test 587
Daniel Stenberg [Mon, 24 Oct 2011 21:09:59 +0000 (23:09 +0200)]
dist: add test 587

I created test 587 in commit 840eff44f2b but forgot to add the file to
the tarball. Added now.

12 years agotest 588: verify active FTP with multi interface without EPRT
Daniel Stenberg [Mon, 24 Oct 2011 21:08:16 +0000 (23:08 +0200)]
test 588: verify active FTP with multi interface without EPRT

This is using the verbatim 525 test code but it disables EPRT in the
server and this should work just as well anyway.

12 years agoFTP server: allow EPRT by default
Daniel Stenberg [Mon, 24 Oct 2011 20:54:53 +0000 (22:54 +0200)]
FTP server: allow EPRT by default

EPRT is now supported by default by the server. To disable it, use the
generic REPLY instruction in the <servercmd> tag. Test 116 now has it
disabled. All other existing active FTP port tests strip out the port
commands from the logs already so the change of the server isn't that
noticable.

12 years agoftp.c: some OOM handling fixes
Yang Tse [Mon, 24 Oct 2011 18:42:01 +0000 (20:42 +0200)]
ftp.c: some OOM handling fixes

12 years agoftpserver.pl: ensure integral number usage for passive mode string
Yang Tse [Mon, 24 Oct 2011 18:40:25 +0000 (20:40 +0200)]
ftpserver.pl: ensure integral number usage for passive mode string

12 years agolarge headers: have curl accept >16K headers
Daniel Stenberg [Mon, 24 Oct 2011 15:28:41 +0000 (17:28 +0200)]
large headers: have curl accept >16K headers

As commit 5850cc4808ab clarifies, libcurl can deliver header lines that
are longer than CURL_MAX_WRITE_SIZE, only body data is limited to that
size. The curl tool has check (when built debug-enabled) that made the
wrong checks and this new test 1205 verifies that larger headers work.

12 years agocurl_easy_setopt.3: headers can be CURL_MAX_HTTP_HEADER bytes
Daniel Stenberg [Mon, 24 Oct 2011 14:43:53 +0000 (16:43 +0200)]
curl_easy_setopt.3: headers can be CURL_MAX_HTTP_HEADER bytes

Mention this maximum header size for the header callback cases

12 years agoMerge pull request #25 from trtom/master
Daniel Stenberg [Mon, 24 Oct 2011 11:11:43 +0000 (04:11 -0700)]
Merge pull request #25 from trtom/master

make sure the static build uses the static build option!

12 years agocurl_easy_setopt.3: fix typo
Daniel Stenberg [Sun, 23 Oct 2011 22:13:47 +0000 (00:13 +0200)]
curl_easy_setopt.3: fix typo

shoot, Dan Fandrich already had this pointed out...

12 years agocurl_easy_setopt: Added pop3 to CURLOPT_URL.
Steve Holme [Fri, 21 Oct 2011 21:59:50 +0000 (22:59 +0100)]
curl_easy_setopt: Added pop3 to CURLOPT_URL.

Added pop3 username and password example as well as an explanation of
how path part of the URL is used under pop3.

Additionally have corrected a couple of typos.

12 years agotool_operate.c: OOM handling fix
Yang Tse [Sat, 22 Oct 2011 12:46:49 +0000 (14:46 +0200)]
tool_operate.c: OOM handling fix

Move curl_easy_perform source code geneartion out of curl_easy_perform's loop
for proper OOM handling and source code geneartion.

12 years agocurl_multi_fdset: correct fdset with FTP PORT use
Daniel Stenberg [Fri, 21 Oct 2011 21:36:54 +0000 (23:36 +0200)]
curl_multi_fdset: correct fdset with FTP PORT use

After a PORT has been issued, and the multi handle would switch to the
CURLM_STATE_DO_MORE state (which is unique for FTP), libcurl would
return the wrong fdset to wait for when curl_multi_fdset() is
called. The code would blindly assume that it was waiting for a connect
of the second connection, while that isn't true immediately after the
PORT command.

Also, the function multi.c:domore_getsock() was highly FTP-centric and
therefore ugly to keep in protocol-agnostic code. I solved this problem
by introducing a new function pointer in the Curl_handler struct called
domore_getsock() which is only called during the DOMORE state for
protocols that set that pointer.

The new ftp.c:ftp_domore_getsock() function now returns fdset info about
the control connection's command/response handling while such a state is
in use, and goes over to waiting for a writable second connection first
once the commands are done.

The original problem could be seen by running test 525 and checking the
time stamps in the FTP server log. I can verify that this fix at least
fixes this problem.

Bug: http://curl.haxx.se/mail/lib-2011-10/0250.html
Reported by: Gokhan Sengun

12 years agoAdded some missing test case XML tags and keywords
Dan Fandrich [Fri, 21 Oct 2011 20:30:22 +0000 (13:30 -0700)]
Added some missing test case XML tags and keywords

12 years agofile.c: OOM handling fix
Yang Tse [Fri, 21 Oct 2011 14:40:02 +0000 (16:40 +0200)]
file.c: OOM handling fix

file_disconnect() free's resources for multi API