platform/upstream/curl.git
12 years agocurl.h: add __ANDROID__ macro check
Cédric Deltheil [Tue, 20 Dec 2011 11:23:11 +0000 (12:23 +0100)]
curl.h: add __ANDROID__ macro check

When working with the Android Standalone Toolchain the compiler defines
this macro:

  /path/to/arm-linux-androideabi-gcc -E -dM - < /dev/null \
  | grep -i android
  #define __ANDROID__ 1

We really need to check both ANDROID and __ANDROID__ since I've observed
that:

* if you use Android.mk file(s) and the 'ndk-build' script (aka vanilla
way), ANDROID is predefined (see -DANDROID extra C flag),

* if you use the Android Standalone Toolchain, then __ANDROID__ is
predefined as stated by the compiler

12 years agolib500: verify timers relative each other
Daniel Stenberg [Tue, 20 Dec 2011 14:41:43 +0000 (15:41 +0100)]
lib500: verify timers relative each other

As commit ce896875f8 fixed a timer that accidentally had been moved in
code and then returned a bad timer, the lib500.c code (used in test 500
and some others) now verifies 5 timers against each other to verify that
they have the correct relative values. We cannot compare against
absolute values as the timings will vary a lot.

12 years agoCurl_pgrsTime: store now in an auto variable
Daniel Stenberg [Tue, 20 Dec 2011 14:05:50 +0000 (15:05 +0100)]
Curl_pgrsTime: store now in an auto variable

It makes it easier to introduce debug outputs in this function, and
everything in the function is using the value anyway so it might even be
more efficient.

12 years agotimer: restore PRETRANSFER timing
Daniel Stenberg [Tue, 20 Dec 2011 13:59:46 +0000 (14:59 +0100)]
timer: restore PRETRANSFER timing

Regression introduced in 7.23.0 with commit 9dd85bce. The function in
which the PRETRANSFER time stamp was recorded was moved in time causing
it be stored very quickly after the start timestamp. On most systems
shorter than 1 millisecond and thus it wouldn't even show with -w
"%{time_pretransfer}" using the command line tool.

Bug: http://curl.haxx.se/mail/archive-2011-12/0022.html
Reported by: Toni Moreno

12 years agolibcurl.m4: Fix quoting arguments of AC_LANG_PROGRAM
Bernhard Reutner-Fischer [Tue, 20 Dec 2011 12:31:08 +0000 (13:31 +0100)]
libcurl.m4: Fix quoting arguments of AC_LANG_PROGRAM

Parameters were underquoted, resulting in
warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agogitignore: ignore the symbol versioning file
Daniel Stenberg [Tue, 20 Dec 2011 10:07:23 +0000 (11:07 +0100)]
gitignore: ignore the symbol versioning file

12 years agotutorial: remove CURLM_CALL_MULTI_PERFORM add sharing
Daniel Stenberg [Tue, 20 Dec 2011 08:48:32 +0000 (09:48 +0100)]
tutorial: remove CURLM_CALL_MULTI_PERFORM add sharing

The CURLM_CALL_MULTI_PERFORM reference is an old leftover I had to
remove.

I also added some blurb to the previously blank "sharing" section.

12 years agoconfigure: add symbols versioning option
Alessandro Ghedini [Fri, 16 Dec 2011 14:33:48 +0000 (15:33 +0100)]
configure: add symbols versioning option

Allow, at configure time, the production of versioned symbols. The
symbols will look like "CURL_<FLAVOUR>_<VERSION> <SYMBOL>", where
<FLAVOUR> represents the SSL flavour (e.g. OPENSSL, GNUTLS, NSS, ...),
<VERSION> is the major SONAME version and <SYMBOL> is the actual symbol
name. If no SSL library is enabled the symbols will be just
"CURL_<VERSION> <SYMBOL>".

12 years agoUse Curl_ssl_connect for non-blocking connect fallback
Sven Wegener [Fri, 27 May 2011 15:46:11 +0000 (17:46 +0200)]
Use Curl_ssl_connect for non-blocking connect fallback

This gets the appconnect time right for ssl backends, which don't
support non-blocking connects.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
12 years agoRELEASE-NOTES: synced with af9bc1604c1
Daniel Stenberg [Mon, 19 Dec 2011 19:08:59 +0000 (20:08 +0100)]
RELEASE-NOTES: synced with af9bc1604c1

One new feature, one bug fix. Introduced references in this file for
mentioned issues after this discussion:
http://curl.haxx.se/mail/lib-2011-12/0187.html

The plan is to let the references get moved over to the changes.html
file at release-time

12 years agocurl.1: minor white space cleanup
Daniel Stenberg [Mon, 19 Dec 2011 13:23:23 +0000 (14:23 +0100)]
curl.1: minor white space cleanup

12 years agodocs: improve description of the --capath option
Alessandro Ghedini [Sat, 17 Dec 2011 14:04:57 +0000 (15:04 +0100)]
docs: improve description of the --capath option

Document the possibility of providing multiple values using the ":"
separator, and the fact that the default value will be ignored if the
option is used.

12 years agoDOCS: Added SMTP information to CURLOPT_INFILESIZE
Steve Holme [Thu, 15 Dec 2011 22:24:25 +0000 (22:24 +0000)]
DOCS: Added SMTP information to CURLOPT_INFILESIZE

12 years agoCurl_proxyCONNECT: use newlines in debug output
Daniel Stenberg [Sat, 17 Dec 2011 22:47:01 +0000 (23:47 +0100)]
Curl_proxyCONNECT: use newlines in debug output

12 years agocurl -F: fix multiple file upload with custom type
Daniel Stenberg [Fri, 16 Dec 2011 10:43:25 +0000 (11:43 +0100)]
curl -F: fix multiple file upload with custom type

Test case 1315 was added to verify this functionality. When passing in
multiple files to a single -F, the parser would get all confused if one
of the specified files had a custom type= assigned.

Reported by: Colin Hogben

12 years agoNew test for multiple file upload
Colin Hogben [Tue, 13 Dec 2011 21:00:38 +0000 (21:00 +0000)]
New test for multiple file upload

test 1315 checks correct behaviour when uploading multiple files.
Buggy behaviour has been seen where only two attachments are sent.

12 years agoconfigure: libtool 1.5 tweaks
Yang Tse [Thu, 15 Dec 2011 17:01:00 +0000 (18:01 +0100)]
configure: libtool 1.5 tweaks

12 years agoCorrect substitution var names
Colin Hogben [Thu, 15 Dec 2011 09:08:42 +0000 (09:08 +0000)]
Correct substitution var names

Two variable names were wrong in the documentation.

12 years agoCorrect default upload mimetype in manual
Colin Hogben [Wed, 14 Dec 2011 13:30:54 +0000 (13:30 +0000)]
Correct default upload mimetype in manual

The default content-type for file uploads is application/octet-stream,
not text/plain as stated in the MANUAL.

12 years agodocs: fix typo in curl_easy_setopt manpage
Alessandro Ghedini [Wed, 14 Dec 2011 21:00:56 +0000 (22:00 +0100)]
docs: fix typo in curl_easy_setopt manpage

12 years agoif2ip.[ch]: fix compilation with MinGW
Yang Tse [Tue, 13 Dec 2011 17:37:33 +0000 (18:37 +0100)]
if2ip.[ch]: fix compilation with MinGW

Avoid 'interface' literal that some MinGW versions define as a macro

12 years agoconnect.c: fix compiler warning 'enumerated type is mixed with another type'
Yang Tse [Tue, 13 Dec 2011 15:18:08 +0000 (16:18 +0100)]
connect.c: fix compiler warning 'enumerated type is mixed with another type'

12 years agoif2ip.c: fix compiler warning 'unused parameter'
Yang Tse [Tue, 13 Dec 2011 15:08:42 +0000 (16:08 +0100)]
if2ip.c: fix compiler warning 'unused parameter'

12 years agopop3.c: fix compiler warning variable may be used uninitialized
Yang Tse [Tue, 13 Dec 2011 14:58:02 +0000 (15:58 +0100)]
pop3.c: fix compiler warning variable may be used uninitialized

12 years agoif2ip.c: fix compiler warning 'enumerated type is mixed with another type'
Yang Tse [Tue, 13 Dec 2011 14:47:26 +0000 (15:47 +0100)]
if2ip.c: fix compiler warning 'enumerated type is mixed with another type'

12 years agoCURLOPT_INTERFACE: avoid resolving interfaces names
Jason Glasgow [Fri, 4 Nov 2011 20:48:05 +0000 (16:48 -0400)]
CURLOPT_INTERFACE: avoid resolving interfaces names

Do not try to resolve interfaces names via DNS by recognizing interface
names in a few ways.  If the interface option argument has a prefix of
"if!" then treat the argument as only an interface.  Similarly, if the
interface argument is the name of an interface (even if it does not have
an IP address assigned), treat it as an interface name.  Finally, if the
interface argument is prefixed by "host!" treat it as a hostname that
must be resolved by /etc/hosts or DNS.

These changes allow a client using the multi interfaces to avoid
blocking on name resolution if the interface loses its IP address or
disappears.

12 years agoRELEASE-NOTES: synced with 1259ccf7474
Daniel Stenberg [Mon, 12 Dec 2011 19:06:50 +0000 (20:06 +0100)]
RELEASE-NOTES: synced with 1259ccf7474

5 more bugfixes, 5 more contributors

12 years agoConnectionExists: Fix reuse for TLS upgraded connections
Steve Holme [Sun, 11 Dec 2011 16:03:08 +0000 (16:03 +0000)]
ConnectionExists: Fix reuse for TLS upgraded connections

Fixed the connection reuse detection in ConnectionExists() when
comparing a new connection that is non-SSL based against that of a SSL
based connection that has become so by being upgraded via TLS.

12 years agocreate_conn: don't switch to HTTP protocol if tunneling is enabled
Daniel Stenberg [Fri, 9 Dec 2011 21:51:08 +0000 (22:51 +0100)]
create_conn: don't switch to HTTP protocol if tunneling is enabled

This is a regression since who knows when. When spotting that a HTTP
proxy is used we must not uncondititionally enable the HTTP protocol
since if we do tunneling through the proxy we're still using the target
protocol.

Reported by: Naveen Chandran

12 years agoFAQ: add --resolve details to question 3.19
Daniel Stenberg [Wed, 7 Dec 2011 22:08:15 +0000 (23:08 +0100)]
FAQ: add --resolve details to question 3.19

12 years agoCurl_closesocket: clear sock_accepted on close
Gokhan Sengun [Wed, 7 Dec 2011 15:00:20 +0000 (16:00 +0100)]
Curl_closesocket: clear sock_accepted on close

As a follow-up from commit d5b5f64bce3a8, clear the sock_accepted status
when such a socket is closed to avoid a re-used connection to retain the
state wrongly.

Bug: http://curl.haxx.se/mail/lib-2011-12/0079.html

12 years agostatic SSL windows builds: add more libs to the link
Daniel Stenberg [Wed, 7 Dec 2011 14:52:25 +0000 (15:52 +0100)]
static SSL windows builds: add more libs to the link

Starting with some recent OpenSSL versions (1.0.0e was mentioned)
linking with a static openssl requires a set of more libs to be linked
on Windows.

Thanks also to Steve Holme and Martin Storsjö for additional feedback.

Bug: http://curl.haxx.se/mail/lib-2011-12/0063.html
Reported by: Ward Willats

12 years agomulti interface: fix block when CONNECT_ONLY option is used
Gokhan Sengun [Tue, 6 Dec 2011 22:41:24 +0000 (23:41 +0100)]
multi interface: fix block when CONNECT_ONLY option is used

12 years agoAdded some include files in a couple of example programs
Dan Fandrich [Wed, 7 Dec 2011 03:54:48 +0000 (19:54 -0800)]
Added some include files in a couple of example programs

This improves portability of the examples.  This patch was
submitted to the OpenBSD ports collection by naddy.

12 years agoMakefileBuild: fix the static build
Daniel Stenberg [Tue, 6 Dec 2011 19:02:57 +0000 (20:02 +0100)]
MakefileBuild: fix the static build

This is a left-over fix from commit b7e242de0e that Tom Wright
suggested.

Reported by: Ward Willats

12 years agoOpenSSL: check for the SSLv2 function in configure
Daniel Stenberg [Tue, 6 Dec 2011 13:22:45 +0000 (14:22 +0100)]
OpenSSL: check for the SSLv2 function in configure

If no SSLv2 was detected in OpenSSL by configure, then we enforce the
OPENSSL_NO_SSL2 define as it seems some people report it not being
defined properly in the OpenSSL headers.

12 years agoCURLOPT_CONNECTTIMEOUT: default is 300 seconds
Daniel Stenberg [Mon, 5 Dec 2011 22:19:50 +0000 (23:19 +0100)]
CURLOPT_CONNECTTIMEOUT: default is 300 seconds

If the option is set to 0, the default timeout will be used - which in
modern libcurl versions equals 300 seconds (== 5 minutes).

Bug: http://curl.haxx.se/mail/lib-2011-12/0051.html
Reported by: Vladimir Grishchenko

12 years agoprogress function example: include timed interval
Rob Ward [Mon, 5 Dec 2011 22:07:38 +0000 (23:07 +0100)]
progress function example: include timed interval

Adds a timer based off of CURLINFO_TOTAL_TIME that is used to perform
certain actions after a minimum amount of time has passed using the
progress function. As a consequence the curl handle is now also passed
into the progress function. Progress example now also includes an
example of how to retreive the TOTAL_TIME and print it out.

12 years agoRELEASE-NOTES: synced with 347f951c390
Daniel Stenberg [Mon, 5 Dec 2011 21:58:30 +0000 (22:58 +0100)]
RELEASE-NOTES: synced with 347f951c390

8 more bugs, 5 more contributors

12 years agoSSH: fix CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
Daniel Stenberg [Mon, 5 Dec 2011 21:20:48 +0000 (22:20 +0100)]
SSH: fix CURLOPT_SSH_HOST_PUBLIC_KEY_MD5

When a 32 digit hex key is given as a hostkey md5 checksum, the code
would still run it against the knownhost check and not properly
acknowledge that the md5 should then be the sole guide for.

The verbose output now includes the evaluated MD5 hostkey checksum.

Some related source code comments were also updated.

Bug: http://curl.haxx.se/bug/view.cgi?id=3451592
Reported by: Reza Arbab

12 years agoCurl_resolver_is_resolved: differentiate between host/proxy errors
Daniel Stenberg [Mon, 5 Dec 2011 11:44:55 +0000 (12:44 +0100)]
Curl_resolver_is_resolved: differentiate between host/proxy errors

As there are different return codes for host vs proxy errors, this function
now properly returns the code properly depending on what was attempted to get
resolved.

Bug: http://curl.haxx.se/mail/archive-2011-12/0010.html
Reported by: Jason Liu

12 years agoc-ares: return proxy failure for all proxy types
Daniel Stenberg [Mon, 5 Dec 2011 11:41:38 +0000 (12:41 +0100)]
c-ares: return proxy failure for all proxy types

When making a distinction which return code to return, the code previously
only regarded HTTP proxies to be proxies and thus return host-related errors
for failures on other proxy types than HTTP. Now all proxy types will be
considered proxies...

12 years agoFTP: close callback fix
Daniel Stenberg [Mon, 5 Dec 2011 11:34:27 +0000 (12:34 +0100)]
FTP: close callback fix

Keep track of which sockets that are the result of accept() calls and
refuse to call the closesocket callback for those sockets. Test case 596
now verifies that the open socket callback is called the same number of
times as the closed socket callback for active FTP connections.

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

12 years agoFTP: call opensocket callback properly
Daniel Stenberg [Mon, 5 Dec 2011 10:42:10 +0000 (11:42 +0100)]
FTP: call opensocket callback properly

When the new socket is created for an active connection, it is now done
using the open socket callback.

Test case 596 was modified to run fine, although it hides the fact that
the close callback is still called too many times, as it also gets
called for closing sockets that were created with accept().

12 years agoCurl_socket: internal replacement for socket()
Daniel Stenberg [Mon, 5 Dec 2011 09:58:38 +0000 (10:58 +0100)]
Curl_socket: internal replacement for socket()

Moved out into a separate function to work as a "generic" socket()
replacement.

12 years agotest: verify the opensocket callback for FTP
Daniel Stenberg [Sun, 4 Dec 2011 22:10:12 +0000 (23:10 +0100)]
test: verify the opensocket callback for FTP

test 595: for passive FTP
test 596: for active FTP

12 years agoCURLOPT_DNS_SERVERS: set name servers if possible (fix)
Jason Glasgow [Thu, 1 Dec 2011 04:39:02 +0000 (23:39 -0500)]
CURLOPT_DNS_SERVERS: set name servers if possible (fix)

Ensure that CURLE_OK is returned if setting the name servers is successfull.

12 years agomulti interface: only use non-NULL function pointer!
Daniel Stenberg [Fri, 2 Dec 2011 20:10:28 +0000 (21:10 +0100)]
multi interface: only use non-NULL function pointer!

If the socket callback function pointer hasn't been set, we must not
attempt to use it. Commit adc88ca20 made it more likely to occur.

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.