platform/upstream/curl.git
12 years agoFAQ: updated 1.10 How many are using curl?
Daniel Stenberg [Wed, 16 May 2012 21:17:47 +0000 (23:17 +0200)]
FAQ: updated 1.10 How many are using curl?

Now linking to http://daniel.haxx.se/blog/2012/05/16/300m-users/

12 years agodisable-versioned-symbols: removed superfluous 'fi'
Daniel Stenberg [Mon, 14 May 2012 20:23:53 +0000 (22:23 +0200)]
disable-versioned-symbols: removed superfluous 'fi'

The commit e315927a1a left this in

12 years agoMakefileBuild.vc: use the correct IDN variable
Daniel Stenberg [Mon, 14 May 2012 09:40:59 +0000 (11:40 +0200)]
MakefileBuild.vc: use the correct IDN variable

The variable that control IDN enablement is called USE_IDN within these
Makefiles

12 years agoautoconf: improve handling of versioned symbols
Pierre Chapuis [Thu, 10 May 2012 16:50:51 +0000 (18:50 +0200)]
autoconf: improve handling of versioned symbols

It checks whether versioned symbols should be enabled before checking
whether it is possible (i.e. the linker supports --version-script) or
not. This avoids a useless warning when building cURL on a platform that
does not use GNU ld.

Moreover, it fixes broken indentation of this chunk of code.

12 years agocurl.1: clarify -x usage
Daniel Stenberg [Sat, 12 May 2012 21:31:27 +0000 (23:31 +0200)]
curl.1: clarify -x usage

1 - fix the syntax in the .IP line

2 - Provided user names and passwords are URL decoded by libcurl

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

12 years agoNTLM: is supported in GnuTLS builds too
Daniel Stenberg [Sat, 12 May 2012 21:15:51 +0000 (23:15 +0200)]
NTLM: is supported in GnuTLS builds too

... since commit 9a4c887c4a7 introduced in libcurl 7.19.4

12 years agoTODO: happy eyeballs is now RFC6555
Daniel Stenberg [Sat, 12 May 2012 13:08:35 +0000 (15:08 +0200)]
TODO: happy eyeballs is now RFC6555

12 years agomy_useragent: shorten user-agent
Daniel Stenberg [Sat, 12 May 2012 13:07:07 +0000 (15:07 +0200)]
my_useragent: shorten user-agent

The built-in user-agent will now only say curl/[version] and nothing
else in an attempt to decrease overhead in HTTP requests.

12 years agoCURLOPT_HEADERFUNCTION: works for non-HTTP protocols too
Daniel Stenberg [Sun, 6 May 2012 22:13:46 +0000 (00:13 +0200)]
CURLOPT_HEADERFUNCTION: works for non-HTTP protocols too

12 years agoAdd note about default timeout in CURLOPT_TIMEOUT
Claes Jakobsson [Thu, 3 May 2012 11:49:55 +0000 (13:49 +0200)]
Add note about default timeout in CURLOPT_TIMEOUT

12 years agoMD5: OOM fix
Gokhan Sengun [Wed, 2 May 2012 20:34:45 +0000 (23:34 +0300)]
MD5: OOM fix

check whether md5 initialization succeeded before updating digest of
buffers onto it

12 years agoREALEASE-NOTES: synced with 64f48e884e3c1
Daniel Stenberg [Sun, 29 Apr 2012 21:10:37 +0000 (23:10 +0200)]
REALEASE-NOTES: synced with 64f48e884e3c1

12 years agoadd newly created manual page
Jan Schaumann [Fri, 27 Apr 2012 17:53:19 +0000 (13:53 -0400)]
add newly created manual page

12 years agoadd a manual page for mk-ca-bundle
Jan Schaumann [Fri, 27 Apr 2012 17:49:40 +0000 (13:49 -0400)]
add a manual page for mk-ca-bundle

12 years agoUpdated dependency lib versions.
Guenter Knauf [Thu, 26 Apr 2012 12:40:50 +0000 (14:40 +0200)]
Updated dependency lib versions.

12 years agoURL parse: reject numerical IPv6 addresses outside brackets
Daniel Stenberg [Mon, 23 Apr 2012 18:23:53 +0000 (20:23 +0200)]
URL parse: reject numerical IPv6 addresses outside brackets

Roman Mamedov spotted (in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670126) that curl would
not complain when given a URL with an IPv6 numerical address without
brackets. It would simply cut off the last ":[hex]" part and thus not
work correctly.

That's a URL using an illegal syntax and now libcurl will instead return
a clear error code and error message detailing the error.

The above mentioned bug report claims this to be a regression but
libcurl does not guarantee functionality when given URLs that aren't
following the URL spec (RFC3986 mostly). I consider the fact that it
used to handle this differently a mere coincidence.

12 years agoCurl_MD5_init: fix OOM memory leak
Daniel Stenberg [Mon, 23 Apr 2012 21:07:40 +0000 (23:07 +0200)]
Curl_MD5_init: fix OOM memory leak

Bug: http://curl.haxx.se/mail/lib-2012-04/0246.html
Reported by: Michael Mueller

12 years agoOpenSSL cert: provide more details when cert check fails
Gokhan Sengun [Tue, 29 Feb 2000 14:49:47 +0000 (16:49 +0200)]
OpenSSL cert: provide more details when cert check fails

curl needs to be more chatty regarding certificate verification failure
during SSL handshake

12 years agoRevert "sspi: Added version information"
Yang Tse [Mon, 23 Apr 2012 14:28:01 +0000 (16:28 +0200)]
Revert "sspi: Added version information"

This reverts commit 2976de480808119dae08fc6f52c8d75ba1aedb1a.

12 years agoRevert "sspi - Small code tidy up"
Yang Tse [Mon, 23 Apr 2012 14:27:47 +0000 (16:27 +0200)]
Revert "sspi - Small code tidy up"

This reverts commit 46cd5f1daddad3b3e542e6d93eee52e8bb9a8687.

12 years agoRevert "Fixed 'extra tokens at end of #endif directive'."
Yang Tse [Mon, 23 Apr 2012 14:27:33 +0000 (16:27 +0200)]
Revert "Fixed 'extra tokens at end of #endif directive'."

This reverts commit 77172a242fc0c820f97eae39d0e3e0f265222fe6.

12 years agoRevert "Fixed 'Trailing whitespace' found by checksrc."
Yang Tse [Mon, 23 Apr 2012 14:27:20 +0000 (16:27 +0200)]
Revert "Fixed 'Trailing whitespace' found by checksrc."

This reverts commit 683bfa60ad0b52505947e59b03515e5f44378523.

12 years agoRevert "sspi: Code tidy up to remove unused variable."
Yang Tse [Mon, 23 Apr 2012 14:27:04 +0000 (16:27 +0200)]
Revert "sspi: Code tidy up to remove unused variable."

This reverts commit 412510f97407d617426d93b80e6b6bf0a8ff11ac.

12 years agoRevert "Add -lversion if build with SSPI."
Yang Tse [Mon, 23 Apr 2012 14:26:21 +0000 (16:26 +0200)]
Revert "Add -lversion if build with SSPI."

This reverts commit 9ec0b7e0c44d29eca6f45916fe5af3501168fe85.

12 years agoAdd -lversion if build with SSPI.
Guenter Knauf [Mon, 23 Apr 2012 00:14:38 +0000 (02:14 +0200)]
Add -lversion if build with SSPI.

12 years agosspi: Code tidy up to remove unused variable.
Steve Holme [Sun, 22 Apr 2012 20:00:32 +0000 (21:00 +0100)]
sspi: Code tidy up to remove unused variable.

12 years agoFixed 'Trailing whitespace' found by checksrc.
Guenter Knauf [Sun, 22 Apr 2012 19:19:36 +0000 (21:19 +0200)]
Fixed 'Trailing whitespace' found by checksrc.

12 years agoFixed 'extra tokens at end of #endif directive'.
Guenter Knauf [Sun, 22 Apr 2012 19:10:17 +0000 (21:10 +0200)]
Fixed 'extra tokens at end of #endif directive'.

12 years agosspi - Small code tidy up
Steve Holme [Sun, 22 Apr 2012 17:59:07 +0000 (18:59 +0100)]
sspi - Small code tidy up

12 years agosspi: Added version information
Steve Holme [Sun, 22 Apr 2012 17:49:27 +0000 (18:49 +0100)]
sspi: Added version information

Added version information for Windows SSPI to curl's main version
string and removed SSPI from the features string.

12 years agoHTTP: empty chunked POST ended up in two zero size chunks
Daniel Stenberg [Fri, 20 Apr 2012 18:40:55 +0000 (20:40 +0200)]
HTTP: empty chunked POST ended up in two zero size chunks

When doing a chunked-encoded POST with -d (CURLOPT_POSTFIELDS) and the
size of the POST was zero length, it made libcurl first send a zero
chunk and then the terminating one. This could confuse a receiver and it
should rather just send the terminating chunk as it does with this fix.

Test case 1333 is added to verify.

Bug: http://curl.haxx.se/mail/archive-2012-04/0060.html
Reported by: Arnaud Compan

12 years agoUpdated dependency lib versions.
Guenter Knauf [Fri, 20 Apr 2012 11:33:54 +0000 (13:33 +0200)]
Updated dependency lib versions.

12 years agosingleipconnect: return OK even when Curl_socket() fails
Daniel Stenberg [Thu, 19 Apr 2012 21:31:50 +0000 (23:31 +0200)]
singleipconnect: return OK even when Curl_socket() fails

Commit 9109cdec11ee5a brought this regression (shipped since 7.24.0).

The singleipconnect() function must not return an error if Curl_socket()
returns an error. It should then simply return OK and pass a SOCKET_BAD
back simply because that is how the user of this function expects it to
work and something else is not fine.

Reported by: Blaise Potard
Bug: http://curl.haxx.se/bug/view.cgi?id=3516508

12 years agoTake in account that CURLAUTH_* bitmasks are now 'unsigned long' - follow-up
Yang Tse [Thu, 19 Apr 2012 14:31:11 +0000 (16:31 +0200)]
Take in account that CURLAUTH_* bitmasks are now 'unsigned long' - follow-up

MIPSPro compiler detected curl_easy_getinfo() related missing adjustments.
SunPro compiler detected curl tool --libcurl option related missing adjustments.

12 years agourl.c: CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH fixes
Yang Tse [Wed, 18 Apr 2012 22:35:44 +0000 (00:35 +0200)]
url.c: CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH fixes

Fail with CURLE_NOT_BUILT_IN when none of requested auth methods is supported.

Reject CURLAUTH_ONLY bit when given alone or with CURLAUTH_NONE.

12 years agoTake in account that CURLAUTH_* bitmasks are now 'unsigned long'
Yang Tse [Wed, 18 Apr 2012 21:04:35 +0000 (23:04 +0200)]
Take in account that CURLAUTH_* bitmasks are now 'unsigned long'

Data type of internal vars holding CURLAUTH_* bitmasks changed from 'long' to
'unsigned long' for proper handling and operating.

12 years agocurl.h: CURLAUTH_* bitmasks adjusted to become 'unsigned long' typed
Yang Tse [Wed, 18 Apr 2012 21:04:07 +0000 (23:04 +0200)]
curl.h: CURLAUTH_* bitmasks adjusted to become 'unsigned long' typed

Info: http://curl.haxx.se/mail/lib-2012-04/0170.html

12 years agoSome explicit conversion to 'long' of curl_easy_setopt() third argument
Yang Tse [Wed, 18 Apr 2012 19:03:20 +0000 (21:03 +0200)]
Some explicit conversion to 'long' of curl_easy_setopt() third argument

Explicit conversion to 'long' of curl_easy_setopt() third argument for options
CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH given that this is how its bitmasks are
docummented to be used.

12 years agobuild adjustments: commit 9e24b9c7 follow-up
Yang Tse [Tue, 17 Apr 2012 10:42:14 +0000 (12:42 +0200)]
build adjustments: commit 9e24b9c7 follow-up

12 years ago-# progress meter: avoid superfluous updates and duplicate lines
Daniel Stenberg [Mon, 16 Apr 2012 22:45:20 +0000 (00:45 +0200)]
-# progress meter: avoid superfluous updates and duplicate lines

By comparing if a different "progress point" is reached or not since the
previous update, the progress function callback for this now avoids many
superfluous screen updates. This has the nice side-effect that it fixes
a problem that causes a second progress meter line.

The second line output happened because when we use the -# progress
meter, we force a newline output after the transfer in the main loop in
curl, but when libcurl calls the progress callback from
curl_easy_cleanup() it would then output the progress display
again. Possibly the naive newline output is wrong but this optimization
was suitable anyway...

Reported by: Daniel Theron
Bug: http://curl.haxx.se/bug/view.cgi?id=3517418

12 years agonss.c: fix compiler warning
Yang Tse [Mon, 16 Apr 2012 20:37:12 +0000 (22:37 +0200)]
nss.c: fix compiler warning

12 years agocurl-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds
Yang Tse [Mon, 16 Apr 2012 00:49:50 +0000 (02:49 +0200)]
curl-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds

When building a Windows target with gcc 4.5 or newer and strict compiler
warnings enabled use -Wno-pedantic-ms-format in addition to other flags.

12 years agotests/valgrind.pm: suppress memleaks of NSS_InitContext()
Kamil Dudka [Mon, 16 Apr 2012 13:01:15 +0000 (15:01 +0200)]
tests/valgrind.pm: suppress memleaks of NSS_InitContext()

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=745224

12 years agosetup_once.h: tighten requirements for stdbool.h header inclusion
Yang Tse [Sat, 14 Apr 2012 13:41:38 +0000 (15:41 +0200)]
setup_once.h: tighten requirements for stdbool.h header inclusion

Include stdbool.h only when it is available and configure is capable of
detecting a proper 'bool' data type when the header is included.

Compilation fix for old or unpatched versions of XL C compiler.

Report: http://curl.haxx.se/mail/archive-2012-04/0022.html

12 years agoheaders: require GCC 2.7 or newer in order to allow attribute GCC'isms usage
Yang Tse [Sat, 14 Apr 2012 13:12:30 +0000 (15:12 +0200)]
headers: require GCC 2.7 or newer in order to allow attribute GCC'isms usage

Usage in other code paths already protected and requiring even newer versions.

12 years agoheaders: surround GCC attribute names with double underscores
Jonathan Nieder [Sat, 14 Apr 2012 13:06:57 +0000 (15:06 +0200)]
headers: surround GCC attribute names with double underscores

This protects from attribute names being defined by third party's code.

Improvement: http://curl.haxx.se/mail/lib-2012-04/0127.html

12 years agoUpdated copyright year.
Guenter Knauf [Fri, 13 Apr 2012 18:34:30 +0000 (20:34 +0200)]
Updated copyright year.

12 years agotestcurl.pl: build example programs for Android cross-compiles
Yang Tse [Fri, 13 Apr 2012 17:33:45 +0000 (19:33 +0200)]
testcurl.pl: build example programs for Android cross-compiles

12 years agonss.c: fix compiler warning
Yang Tse [Fri, 13 Apr 2012 16:26:42 +0000 (18:26 +0200)]
nss.c: fix compiler warning

12 years agoexamples: fix compiler warnings
Yang Tse [Fri, 13 Apr 2012 15:58:41 +0000 (17:58 +0200)]
examples: fix compiler warnings

12 years agonss: provide human-readable names for NSS errors
Kamil Dudka [Wed, 11 Apr 2012 11:44:20 +0000 (13:44 +0200)]
nss: provide human-readable names for NSS errors

12 years agonss: use NSS_InitContext() to initialize NSS if available
Kamil Dudka [Tue, 10 Apr 2012 13:42:34 +0000 (15:42 +0200)]
nss: use NSS_InitContext() to initialize NSS if available

NSS_InitContext() was introduced in NSS 3.12.5 and helps to prevent
collisions on NSS initialization/shutdown with other libraries.

Bug: https://bugzilla.redhat.com/738456

12 years agonss: unconditionally require PK11_CreateGenericObject()
Kamil Dudka [Fri, 6 Apr 2012 14:05:25 +0000 (16:05 +0200)]
nss: unconditionally require PK11_CreateGenericObject()

This bumps the minimal supported version of NSS to 3.12.x.

12 years agoSet batch mode to 755 to make Cygwin git pulls work.
Guenter Knauf [Fri, 13 Apr 2012 10:11:31 +0000 (12:11 +0200)]
Set batch mode to 755 to make Cygwin git pulls work.

12 years agoAdded section for Android configure cross-compile.
Guenter Knauf [Fri, 13 Apr 2012 08:34:03 +0000 (10:34 +0200)]
Added section for Android configure cross-compile.

12 years agoAdded NetWare export.
Guenter Knauf [Thu, 12 Apr 2012 23:24:34 +0000 (01:24 +0200)]
Added NetWare export.

12 years agotestcurl.pl: build example programs for MinGW cross-compiles
Yang Tse [Thu, 12 Apr 2012 19:14:53 +0000 (21:14 +0200)]
testcurl.pl: build example programs for MinGW cross-compiles

12 years agotool_operate.c: fix compiler warning
Yang Tse [Thu, 12 Apr 2012 18:41:03 +0000 (20:41 +0200)]
tool_operate.c: fix compiler warning

12 years agourl.c: fix compiler warning
Yang Tse [Thu, 12 Apr 2012 18:39:15 +0000 (20:39 +0200)]
url.c: fix compiler warning

12 years agoUpdated dependency lib versions (2nd try).
Guenter Knauf [Thu, 12 Apr 2012 18:51:29 +0000 (20:51 +0200)]
Updated dependency lib versions (2nd try).

12 years agoUpdated dependency lib versions.
Guenter Knauf [Thu, 12 Apr 2012 18:44:50 +0000 (20:44 +0200)]
Updated dependency lib versions.

12 years agotool_formparse.c: rename a couple of vars to avoid declaration shadowing
Yang Tse [Thu, 12 Apr 2012 17:28:46 +0000 (19:28 +0200)]
tool_formparse.c: rename a couple of vars to avoid declaration shadowing

12 years agoOS400/initscript.sh: fix db2_name() module name generation
Yang Tse [Thu, 12 Apr 2012 17:13:23 +0000 (19:13 +0200)]
OS400/initscript.sh: fix db2_name() module name generation

Allow repeatable file name length reduction on file names with underscore or
dash characters. This is done in order to better support libcurl's existing
source file names and allow OS/400 package to build out of the box again.

12 years agotestcurl.pl: log more environment vars that modify configure and build behavior
Yang Tse [Thu, 12 Apr 2012 15:11:17 +0000 (17:11 +0200)]
testcurl.pl: log more environment vars that modify configure and build behavior

12 years agoconfigure: NATIVE_WINDOWS no longer defined in config files
Yang Tse [Thu, 12 Apr 2012 11:08:48 +0000 (13:08 +0200)]
configure: NATIVE_WINDOWS no longer defined in config files

12 years agobuild adjustments: CURL_HIDDEN_SYMBOLS no longer defined in config files
Yang Tse [Wed, 11 Apr 2012 17:33:54 +0000 (19:33 +0200)]
build adjustments: CURL_HIDDEN_SYMBOLS no longer defined in config files

configure script now provides conditional definitions for Makefile.am
that result in CURL_HIDDEN_SYMBOLS being defined by resulting makefiles
when appropriate.

Additionally, configure script option for symbol hiding control is now
named --enable-symbol-hiding --disable-symbol-hiding. While still valid,
old option name --enable-hidden-symbols --disable-hidden-symbols will
be deprecated in some future release.

12 years agobuild adjustments: functionally revert commits 4d3fb91f and bbfe1182
Yang Tse [Wed, 11 Apr 2012 17:28:40 +0000 (19:28 +0200)]
build adjustments: functionally revert commits 4d3fb91f and bbfe1182

Undefining CURL_HIDDEN_SYMBOLS in source files isn't the proper fix.

12 years agotest servers: build adjustment
Yang Tse [Tue, 10 Apr 2012 15:32:06 +0000 (17:32 +0200)]
test servers: build adjustment

Undefine CURL_HIDDEN_SYMBOLS libcurl private preprocessor macro that might
leak from lib/setup.h into source files where this should not be defined.

12 years agolibtests: build adjustment
Yang Tse [Tue, 10 Apr 2012 15:29:37 +0000 (17:29 +0200)]
libtests: build adjustment

Undefine CURL_HIDDEN_SYMBOLS libcurl private preprocessor macro that might
leak from lib/setup.h into source files where this should not be defined.

12 years agocurl tool: make setup.h first header included in tool_setup.h again
Yang Tse [Tue, 10 Apr 2012 01:20:30 +0000 (03:20 +0200)]
curl tool: make setup.h first header included in tool_setup.h again

12 years agocurl tool: use configuration files from lib directory - follow-up II
Yang Tse [Mon, 9 Apr 2012 19:39:03 +0000 (21:39 +0200)]
curl tool: use configuration files from lib directory - follow-up II

lib/config-win32.h no longer copied to src/config-win32.h

12 years agoconfigure: Windows cross-compilation fixes
Yang Tse [Mon, 9 Apr 2012 19:24:16 +0000 (21:24 +0200)]
configure: Windows cross-compilation fixes

BUILDING_LIBCURL and CURL_STATICLIB are no longer defined in curl_config.h,
configure will generate appropriate conditionals so that mentioned symbols
get defined and used in Makefiles at compilation time

12 years agocurl tool: make curl.h first header included in tool_setup.h
Yang Tse [Sun, 8 Apr 2012 11:50:18 +0000 (13:50 +0200)]
curl tool: make curl.h first header included in tool_setup.h

12 years agocurl tool: use configuration files from lib directory - follow-up I
Yang Tse [Fri, 6 Apr 2012 22:31:24 +0000 (00:31 +0200)]
curl tool: use configuration files from lib directory - follow-up I

amigaos.[ch] now integrates nicely with any libcurl build

12 years agocurl tool: use configuration files from lib directory
Yang Tse [Fri, 6 Apr 2012 21:35:15 +0000 (23:35 +0200)]
curl tool: use configuration files from lib directory

Configuration files such as curl_config.h and all config-*.h no longer exist
nor are generated/copied into 'src' directory, now these only exist in 'lib'
directory from where curl tool sources uses them.

Additionally old src/setup.h has been refactored into src/tool_setup.h which
now pulls lib/setup.h

The possibility of a makefile needing an include path adjustment exists.

12 years agoPolarSSL: correct return code for CRL matches
Daniel Stenberg [Fri, 6 Apr 2012 13:10:59 +0000 (15:10 +0200)]
PolarSSL: correct return code for CRL matches

When a server certificate matches one in the given CRL file, the code
now returns CURLE_SSL_CACERT as test case 313 expects and verifies.

12 years agoPolarSSL: include version number in version string
Daniel Stenberg [Fri, 6 Apr 2012 12:44:36 +0000 (14:44 +0200)]
PolarSSL: include version number in version string

Previously it would say PolarSSL only, now it says PolarSSL/1.1.0 in the
same style other libs and components do.

12 years agotest: added test 1332 that tests --post303
Daniel Stenberg [Thu, 5 Apr 2012 21:37:16 +0000 (23:37 +0200)]
test: added test 1332 that tests --post303

12 years agocurl: add --post303 to set the CURL_REDIR_POST_303 option
Daniel Stenberg [Thu, 5 Apr 2012 21:34:12 +0000 (23:34 +0200)]
curl: add --post303 to set the CURL_REDIR_POST_303 option

12 years agoCURLOPT_POSTREDIR: also allow 303 to do POST on the redirected URL
Andrei Cipu [Fri, 30 Mar 2012 07:40:04 +0000 (10:40 +0300)]
CURLOPT_POSTREDIR: also allow 303 to do POST on the redirected URL

As it turns out, some people do want that after all.

12 years agotest1331: cookies on a 407 response
Daniel Stenberg [Thu, 5 Apr 2012 21:22:15 +0000 (23:22 +0200)]
test1331: cookies on a 407 response

Verify that cookies are sent back even after a 407 response has been
received

12 years agoPolarSSL: add support for asynchronous connect
Dag Ekengren [Tue, 27 Mar 2012 12:10:32 +0000 (14:10 +0200)]
PolarSSL: add support for asynchronous connect

12 years agoRevert "access the CA source file using HTTPS"
Tim Heckman [Wed, 4 Apr 2012 14:40:41 +0000 (10:40 -0400)]
Revert "access the CA source file using HTTPS"

This reverts commit f7e2ab6.

This change caused fetching of the certificates to become unreliable.

Bug: http://curl.haxx.se/mail/lib-2012-03/0238.html
Reported by: Tim Heckman

12 years agoIPv6 cookie domain: get rid of the first bracket before the second.
Andrei Cipu [Wed, 4 Apr 2012 12:35:24 +0000 (15:35 +0300)]
IPv6 cookie domain: get rid of the first bracket before the second.

Commit 97b66ebe was copying a smaller buffer, thus duplicating the last
character.

12 years agoMAIL-ETIQUETTE: Added "How to unsubscribe"
Daniel Stenberg [Wed, 4 Apr 2012 21:18:41 +0000 (23:18 +0200)]
MAIL-ETIQUETTE: Added "How to unsubscribe"

... as it seems to hard for some people

12 years agoftp.c: ftplistparser related OOM handling fix
Yang Tse [Wed, 4 Apr 2012 15:30:12 +0000 (17:30 +0200)]
ftp.c: ftplistparser related OOM handling fix

12 years agosmtp.c: fix compiler warnings
Yang Tse [Wed, 4 Apr 2012 15:23:49 +0000 (17:23 +0200)]
smtp.c: fix compiler warnings

12 years agolib599.c: fix compiler warning
Yang Tse [Wed, 4 Apr 2012 15:22:46 +0000 (17:22 +0200)]
lib599.c: fix compiler warning

12 years agoruntests: yassl and polarssl are not openssl
Daniel Stenberg [Tue, 3 Apr 2012 22:07:26 +0000 (00:07 +0200)]
runtests: yassl and polarssl are not openssl

Don't set the "has_openssl" variable if yassl or polarssl is found as
they will simply not work as 100% drop-in replacements for some of the
stuff the "OpenSSL" feature is used for.

I spotted this problem when doing test runs with PolarSSL builds.

12 years agoconnect.c: return changed to CURLE_COULDNT_CONNECT when opensocket fails
Lijo Antony [Mon, 2 Apr 2012 22:45:25 +0000 (02:45 +0400)]
connect.c: return changed to CURLE_COULDNT_CONNECT when opensocket fails

Curl_socket returns CURLE_COULDNT_CONNECT when the opensocket callback
returns CURL_SOCKET_BAD. Previous return value CURLE_FAILED_INIT
conveys incorrect information to the user.

12 years agopop3: Reworked the command sending and handling
Steve Holme [Mon, 2 Apr 2012 22:24:00 +0000 (23:24 +0100)]
pop3: Reworked the command sending and handling

Reworked the command sending from two specific LIST and RETR command
functions into a single command based function as well as the two
associated response handlers into a generic command handler.

12 years agocurl tool: add filename_effective token for --write-out
Dave Reisner [Sun, 4 Mar 2012 23:07:03 +0000 (23:07 +0000)]
curl tool: add filename_effective token for --write-out

By modifying the parameter list for ourWriteOut() and passing the
OutStruct that collects data in tool_operate, we get access to the
remote name that we're writing to. Shell scripters should find this
useful when used in conjuntion with the --remote-header-name option.

12 years agosmtp.c: Code policing and tidy up
Steve Holme [Sun, 1 Apr 2012 20:09:38 +0000 (21:09 +0100)]
smtp.c: Code policing and tidy up

12 years agoSSH: public key can now be an empty string
Armel Asselin [Sun, 1 Apr 2012 18:22:37 +0000 (20:22 +0200)]
SSH: public key can now be an empty string

If an empty string is passed to CURLOPT_SSH_PUBLIC_KEYFILE, libcurl will
pass no public key to libssh2 which then tries to compute it from the
private key. This is known to work when libssh2 1.4.0+ is linked against
OpenSSL.

12 years agoOpenSSL: Made cert hostname check conform to RFC 6125
Tatsuhiro Tsujikawa [Sun, 1 Apr 2012 12:58:17 +0000 (21:58 +0900)]
OpenSSL: Made cert hostname check conform to RFC 6125

This change replaces RFC 2818 based hostname check in OpenSSL build with
RFC 6125 [1] based one.

The hostname check in RFC 2818 is ambiguous and each project implements
it in the their own way and they are slightly different. I check curl,
gnutls, Firefox and Chrome and they are all different.

I don't think there is a bug in current implementation of hostname
check. But it is not as strict as the modern browsers do. Currently,
curl allows multiple wildcard character '*' and it matches '.'. (as
described in the comment in ssluse.c).

Firefox implementation is also based on RFC 2818 but it only allows at
most one wildcard character and it must be in the left-most label in the
pattern and the wildcard must not be followed by any character in the
label.[2] Chromium implementation is based on RFC 6125 as my patch does.
Firefox and Chromium both require wildcard in the left-most label in the
presented identifier.

This patch is more strict than the current implementation, so there may
be some cases where old curl works but new one does not. But at the same
time I think it is good practice to follow the modern browsers do and
follow the newer RFC.

[1] http://tools.ietf.org/html/rfc6125#section-6.4.3
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=159483

12 years agoHTTP: reset expected DL/UL sizes on redirects
Daniel Stenberg [Fri, 23 Mar 2012 22:42:37 +0000 (23:42 +0100)]
HTTP: reset expected DL/UL sizes on redirects

With FOLLOWLOCATION enabled. When a 3xx page is downloaded and the
download size was known (like with a Content-Length header), but the
subsequent URL (transfered after the 3xx page) was chunked encoded, then
the previous "known download size" would linger and cause the progress
meter to get incorrect information, ie the former value would remain
being sent in. This could easily result in downloads that were WAY
larger than "expected" and would cause >100% outputs with the curl
command line tool.

Test case 599 was created and it was used to repeat the bug and then
verify the fix.

Bug: http://curl.haxx.se/bug/view.cgi?id=3510057
Reported by: Michael Wallner

12 years agosmtp: Add support for DIGEST-MD5 authentication
Gökhan Şengün [Fri, 30 Mar 2012 20:50:56 +0000 (23:50 +0300)]
smtp: Add support for DIGEST-MD5 authentication

12 years agosmtp: Cody tidy up of md5 digest length
Gökhan Şengün [Fri, 30 Mar 2012 20:19:38 +0000 (23:19 +0300)]
smtp: Cody tidy up of md5 digest length

Replaced the hard coded md5 digest length (16) with a preprocessor
constant

12 years agomd5: Add support for calculating the md5 sum of buffers incrementally
Gökhan Şengün [Fri, 30 Mar 2012 20:09:47 +0000 (23:09 +0300)]
md5: Add support for calculating the md5 sum of buffers incrementally

It is now possible to calculate the md5 sum as the stream of buffers
becomes known where as previously it was only possible to calculate the
md5 sum of a pre-prepared buffer.

12 years agoRevert "mk-ca-bundle.pl: use LWP::UserAgent for https"
Daniel Stenberg [Sat, 31 Mar 2012 17:48:15 +0000 (19:48 +0200)]
Revert "mk-ca-bundle.pl: use LWP::UserAgent for https"

This reverts commit 9f0e1689f169b83b8fbdae23e0024cc57dcbc770.

It turned out that "improvement" instead made the fetching of the
certificates unreliable

Bug: http://curl.haxx.se/mail/lib-2012-03/0238.html
Reported by: Tim Heckman