]> granicus.if.org Git - curl/log
curl
6 years agohttp2: read pending frames (including GOAWAY) in connection-check
Daniel Stenberg [Mon, 19 Mar 2018 15:28:05 +0000 (16:28 +0100)]
http2: read pending frames (including GOAWAY) in connection-check

If a connection has received a GOAWAY frame while not being used, the
function now reads frames off the connection before trying to reuse it
to avoid reusing connections the server has told us not to use.

Reported-by: Alex Baines
Fixes #1967
Closes #2402

6 years agoCI: add lgtm.yml for tweaking lgtm.com analysis
Bas van Schaik [Wed, 21 Mar 2018 12:27:28 +0000 (12:27 +0000)]
CI: add lgtm.yml for tweaking lgtm.com analysis

Closes #2414

6 years agoCURLINFO_SSL_VERIFYRESULT.3: fix the example, add some text
Daniel Stenberg [Wed, 21 Mar 2018 00:03:07 +0000 (01:03 +0100)]
CURLINFO_SSL_VERIFYRESULT.3: fix the example, add some text

Reported-by: Michal Trybus
Fixes #2400

6 years agoTODO: expand ~/ in config files
Daniel Stenberg [Tue, 20 Mar 2018 23:49:49 +0000 (00:49 +0100)]
TODO: expand ~/ in config files

Closes #2317

6 years agocookie.d: mention that "-" as filename means stdin
Daniel Stenberg [Tue, 20 Mar 2018 22:25:12 +0000 (23:25 +0100)]
cookie.d: mention that "-" as filename means stdin

Reported-by: Dongliang Mu
Fixes #2410

6 years agoCURLINFO_COOKIELIST.3: made the example not leak memory
Daniel Stenberg [Tue, 20 Mar 2018 22:18:23 +0000 (23:18 +0100)]
CURLINFO_COOKIELIST.3: made the example not leak memory

Reported-by: Muz Dima
6 years agovauth/cleartext: fix integer overflow check
Daniel Stenberg [Tue, 20 Mar 2018 14:15:14 +0000 (15:15 +0100)]
vauth/cleartext: fix integer overflow check

Make the integer overflow check not rely on the undefined behavior that
a size_t wraps around on overflow.

Detected by lgtm.com
Closes #2408

6 years agolib/curl_path.h: add #ifdef header guard
Daniel Stenberg [Tue, 20 Mar 2018 13:37:29 +0000 (14:37 +0100)]
lib/curl_path.h: add #ifdef header guard

Detected by lgtm.com

6 years agovauth/ntlm.h: fix the #ifdef header guard
Daniel Stenberg [Tue, 20 Mar 2018 13:28:38 +0000 (14:28 +0100)]
vauth/ntlm.h: fix the #ifdef header guard

Detected by lgtm.com

6 years agoexamples/hiperfifo: checksrc compliance
Jay Satiro [Tue, 20 Mar 2018 07:12:35 +0000 (03:12 -0400)]
examples/hiperfifo: checksrc compliance

6 years agoparsedate: support UT timezone
Nikos Tsipinakis [Mon, 19 Mar 2018 13:42:36 +0000 (15:42 +0200)]
parsedate: support UT timezone

RFC822 section 5.2 mentions Universal Time, 'UT', to be synonymous with
GMT.

Closes #2401

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 19 Mar 2018 08:21:18 +0000 (09:21 +0100)]
RELEASE-NOTES: synced

6 years agocmake: add support for brotli
Don [Fri, 16 Mar 2018 19:49:13 +0000 (12:49 -0700)]
cmake: add support for brotli

Currently CMake cannot detect Brotli support. This adds detection of the
libraries and associated header files. It also adds this to the
generated config.

Closes #2392

6 years agodarwinssl: fix iOS build
Chris Araman [Sat, 17 Mar 2018 20:49:27 +0000 (13:49 -0700)]
darwinssl: fix iOS build

6 years agoILE/RPG binding: Add CURLOPT_HAPROXYPROTOCOL/Fix CURLOPT_DNS_SHUFFLE_ADDRESSES
Patrick Monnerat [Sun, 18 Mar 2018 00:47:05 +0000 (01:47 +0100)]
ILE/RPG binding: Add CURLOPT_HAPROXYPROTOCOL/Fix CURLOPT_DNS_SHUFFLE_ADDRESSES

6 years agoresolve: add CURLOPT_DNS_SHUFFLE_ADDRESSES
Rick Deist [Sat, 17 Mar 2018 19:10:04 +0000 (20:10 +0100)]
resolve: add CURLOPT_DNS_SHUFFLE_ADDRESSES

This patch adds CURLOPT_DNS_SHUFFLE_ADDRESSES to explicitly request
shuffling of IP addresses returned for a hostname when there is more
than one. This is useful when the application knows that a round robin
approach is appropriate and is willing to accept the consequences of
potentially discarding some preference order returned by the system's
implementation.

Closes #1694

6 years agoadd_handle/easy_perform: clear errorbuffer on start if set
Daniel Stenberg [Mon, 12 Mar 2018 23:51:39 +0000 (00:51 +0100)]
add_handle/easy_perform: clear errorbuffer on start if set

To offer applications a more defined behavior, we clear the buffer as
early as possible.

Assisted-by: Jay Satiro
Fixes #2190
Closes #2377

6 years agoCURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocol
Lawrence Matthews [Thu, 1 Dec 2016 12:05:04 +0000 (04:05 -0800)]
CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocol

Add --haproxy-protocol for the command line tool

Closes #2162

6 years agocurl_version_info.3: fix ssl_version description
Daniel Stenberg [Sat, 17 Mar 2018 10:18:00 +0000 (11:18 +0100)]
curl_version_info.3: fix ssl_version description

Reported-by: Vincas Razma
Fixes #2364

6 years agomulti: improved pending transfers handling => improved performance
Daniel Stenberg [Tue, 13 Mar 2018 15:13:56 +0000 (16:13 +0100)]
multi: improved pending transfers handling => improved performance

When a transfer is requested to get done and it is put in the pending
queue when limited by number of connections, total or per-host, libcurl
would previously very aggressively retry *ALL* pending transfers to get
them transferring. That was very time consuming.

By reducing the aggressiveness in how pending are being retried, we
waste MUCH less time on putting transfers back into pending again.

Some test cases got a factor 30(!) speed improvement with this change.

Reported-by: Cyril B
Fixes #2369
Closes #2383

6 years agopause: when changing pause state, update socket state
Daniel Stenberg [Fri, 16 Mar 2018 11:03:52 +0000 (12:03 +0100)]
pause: when changing pause state, update socket state

Especially unpausing a transfer might have to move the socket back to the
"currently used sockets" hash to get monitored. Otherwise it would never get
any more data and get stuck. Easily triggered with pausing using the
multi_socket API.

Reported-by: Philip Prindeville
Bug: https://curl.haxx.se/mail/lib-2018-03/0048.html
Fixes #2393
Closes #2391

6 years agoexamples/hiperfifo.c: improved
Philip Prindeville [Fri, 16 Mar 2018 15:01:01 +0000 (16:01 +0100)]
examples/hiperfifo.c: improved

 * use member struct event’s instead of pointers to alloc’d struct
   events

 * simplify the cases for the mcode_or_die() function via macros;

 * make multi_timer_cb() actually do what the block comment says it
   should;

 * accept a “stop” command on the FIFO to shut down the service;

 * use cleaner notation for unused variables than the (void) hack;

 * allow following redirections (304’s);

6 years agorate-limit: use three second window to better handle high speeds
Daniel Stenberg [Thu, 15 Mar 2018 15:43:00 +0000 (16:43 +0100)]
rate-limit: use three second window to better handle high speeds

Due to very frequent updates of the rate limit "window", it could
attempt to rate limit within the same milliseconds and that then made
the calculations wrong, leading to it not behaving correctly on very
fast transfers.

This new logic updates the rate limit "window" to be no shorter than the
last three seconds and only updating the timestamps for this when
switching between the states TOOFAST/PERFORM.

Reported-by: 刘佩东
Fixes #2386
Closes #2388

6 years agocleanup: misc typos in strings and comments
luz.paz [Fri, 16 Mar 2018 02:51:03 +0000 (22:51 -0400)]
cleanup: misc typos in strings and comments

Found via `codespell`

Closes #2389

6 years agoRELEASE-NOTES: toward 7.60.0
Daniel Stenberg [Fri, 16 Mar 2018 07:28:20 +0000 (08:28 +0100)]
RELEASE-NOTES: toward 7.60.0

6 years agohttp2: fixes typo
Kobi Gurkan [Thu, 15 Mar 2018 12:34:43 +0000 (14:34 +0200)]
http2: fixes typo

Closes #2387

6 years agouser-agent.d:: mention --proxy-header as well
Daniel Stenberg [Thu, 15 Mar 2018 22:52:43 +0000 (23:52 +0100)]
user-agent.d:: mention --proxy-header as well

Bug: https://github.com/curl/curl/issues/2381

6 years agotransfer: make HTTP without headers count correct body size
Daniel Stenberg [Wed, 14 Mar 2018 23:27:20 +0000 (00:27 +0100)]
transfer: make HTTP without headers count correct body size

This is what "HTTP/0.9" basically looks like.

Reported on IRC

Closes #2382

6 years agotest1208: marked flaky
Daniel Stenberg [Thu, 15 Mar 2018 07:21:26 +0000 (08:21 +0100)]
test1208: marked flaky

It fails somewhere between every 3rd to 10th travis-CI run

6 years agoSECURITY-PROCESS: mention how we write/add advisories
Daniel Stenberg [Wed, 14 Mar 2018 13:20:24 +0000 (14:20 +0100)]
SECURITY-PROCESS: mention how we write/add advisories

6 years agoFTP: fix typo in recursive callback detection for seeking
dasimx [Wed, 14 Mar 2018 10:02:05 +0000 (11:02 +0100)]
FTP: fix typo in recursive callback detection for seeking

Fixes #2380

6 years agorelease: 7.59.0 curl-7_59_0
Daniel Stenberg [Mon, 12 Mar 2018 07:28:29 +0000 (08:28 +0100)]
release: 7.59.0

6 years agotests/.../spnego.py: fix identifier typo
Kamil Dudka [Tue, 13 Mar 2018 11:00:54 +0000 (12:00 +0100)]
tests/.../spnego.py: fix identifier typo

Detected by Coverity Analysis:

Error: IDENTIFIER_TYPO:
curl-7.58.0/tests/python_dependencies/impacket/spnego.py:229: identifier_typo: Using "SuportedMech" appears to be a typo:
* Identifier "SuportedMech" is only known to be referenced here, or in copies of this code.
* Identifier "SupportedMech" is referenced elsewhere at least 4 times.
curl-7.58.0/tests/python_dependencies/impacket/smbserver.py:2651: identifier_use: Example 1: Using identifier "SupportedMech".
curl-7.58.0/tests/python_dependencies/impacket/smbserver.py:2308: identifier_use: Example 2: Using identifier "SupportedMech".
curl-7.58.0/tests/python_dependencies/impacket/spnego.py:252: identifier_use: Example 3: Using identifier "SupportedMech" (2 total uses in this function).
curl-7.58.0/tests/python_dependencies/impacket/spnego.py:229: remediation: Should identifier "SuportedMech" be replaced by "SupportedMech"?

Closes #2379

6 years agoCURLOPT_COOKIEFILE.3: "-" as file name means stdin
Daniel Stenberg [Tue, 13 Mar 2018 12:04:12 +0000 (13:04 +0100)]
CURLOPT_COOKIEFILE.3: "-" as file name means stdin

Reported-by: Aron Bergman
Bug: https://curl.haxx.se/mail/lib-2018-03/0049.html

[ci skip]

6 years agoRevert "hostip: fix compiler warning: 'variable set but not used'"
Daniel Stenberg [Mon, 12 Mar 2018 22:52:28 +0000 (23:52 +0100)]
Revert "hostip: fix compiler warning: 'variable set but not used'"

This reverts commit a577059f92fc65bd6b81717f0737f897a5b34248.

The assignment really needs to be there or we risk working with an
uninitialized pointer.

6 years agolimit-rate: fix compiler warning
Michael Kaufmann [Mon, 12 Mar 2018 20:26:31 +0000 (21:26 +0100)]
limit-rate: fix compiler warning

follow-up to 72a0f62

6 years agochecksrc.pl: add -i and -m options
Viktor Szakats [Mon, 12 Mar 2018 18:19:24 +0000 (18:19 +0000)]
checksrc.pl: add -i and -m options

To sync it with changes made for the libssh2 project.
Also cleanup some whitespace.

6 years agocurl-openssl.m4: fix spelling [ci skip]
Viktor Szakats [Mon, 12 Mar 2018 18:18:39 +0000 (18:18 +0000)]
curl-openssl.m4: fix spelling [ci skip]

6 years agoFAQ: fix a broken URL [ci skip]
Viktor Szakats [Mon, 12 Mar 2018 18:17:05 +0000 (18:17 +0000)]
FAQ: fix a broken URL [ci skip]

6 years agohttp2: mark the connection for close on GOAWAY
Daniel Stenberg [Sat, 10 Mar 2018 22:48:43 +0000 (23:48 +0100)]
http2: mark the connection for close on GOAWAY

... don't consider it an error!

Assisted-by: Jay Satiro
Reported-by: Łukasz Domeradzki
Fixes #2365
Closes #2375

6 years agocredits: Viktor prefers without accent
Daniel Stenberg [Mon, 12 Mar 2018 06:55:58 +0000 (07:55 +0100)]
credits: Viktor prefers without accent

6 years agoopenldap: white space changes, fixed up the copyright years
Daniel Stenberg [Wed, 7 Mar 2018 13:43:12 +0000 (14:43 +0100)]
openldap: white space changes, fixed up the copyright years

6 years agoopenldap: check ldap_get_attribute_ber() results for NULL before using
Daniel Stenberg [Tue, 6 Mar 2018 22:02:16 +0000 (23:02 +0100)]
openldap: check ldap_get_attribute_ber() results for NULL before using

CVE-2018-1000121
Reported-by: Dario Weisser
Bug: https://curl.haxx.se/docs/adv_2018-97a2.html

6 years agoFTP: reject path components with control codes
Daniel Stenberg [Wed, 31 Jan 2018 07:40:11 +0000 (08:40 +0100)]
FTP: reject path components with control codes

Refuse to operate when given path components featuring byte values lower
than 32.

Previously, inserting a %00 sequence early in the directory part when
using the 'singlecwd' ftp method could make curl write a zero byte
outside of the allocated buffer.

Test case 340 verifies.

CVE-2018-1000120
Reported-by: Duy Phan Thanh
Bug: https://curl.haxx.se/docs/adv_2018-9cd6.html

6 years agoreadwrite: make sure excess reads don't go beyond buffer end
Daniel Stenberg [Thu, 8 Mar 2018 09:33:16 +0000 (10:33 +0100)]
readwrite: make sure excess reads don't go beyond buffer end

CVE-2018-1000122
Bug: https://curl.haxx.se/docs/adv_2018-b047.html

Detected by OSS-fuzz

6 years agoBUGS: updated link to security process
Daniel Stenberg [Sun, 11 Mar 2018 23:34:33 +0000 (00:34 +0100)]
BUGS: updated link to security process

6 years agolimit-rate: kick in even before "limit" data has been received
Daniel Stenberg [Sat, 10 Mar 2018 13:07:38 +0000 (14:07 +0100)]
limit-rate: kick in even before "limit" data has been received

... and make sure to avoid integer overflows with really large values.

Reported-by: 刘佩东
Fixes #2371
Closes #2373

6 years agodocs/SECURITY.md -> docs/SECURITY-PROCESS.md
Daniel Stenberg [Sun, 11 Mar 2018 22:41:50 +0000 (23:41 +0100)]
docs/SECURITY.md -> docs/SECURITY-PROCESS.md

6 years agoSECURITY.md: call it the security process
Daniel Stenberg [Sun, 11 Mar 2018 22:40:24 +0000 (23:40 +0100)]
SECURITY.md: call it the security process

6 years agoCurl_range: fix FTP-only and FILE-only builds
Michael Kaufmann [Sun, 11 Mar 2018 19:30:02 +0000 (20:30 +0100)]
Curl_range: fix FTP-only and FILE-only builds

follow-up to e04417d

6 years agohostip: fix compiler warning: 'variable set but not used'
Michael Kaufmann [Sun, 11 Mar 2018 19:27:09 +0000 (20:27 +0100)]
hostip: fix compiler warning: 'variable set but not used'

6 years agoHTTP: allow "header;" to replace an internal header with a blank one
Daniel Stenberg [Mon, 5 Mar 2018 22:38:16 +0000 (23:38 +0100)]
HTTP: allow "header;" to replace an internal header with a blank one

Reported-by: Michael Kaufmann
Fixes #2357
Closes #2362

6 years agohttp2: verbose output new MAX_CONCURRENT_STREAMS values
Daniel Stenberg [Sat, 10 Mar 2018 22:56:21 +0000 (23:56 +0100)]
http2: verbose output new MAX_CONCURRENT_STREAMS values

... as it is interesting for many users.

6 years agoSECURITY: distros' max embargo time is 14 days now
Daniel Stenberg [Fri, 9 Mar 2018 20:42:36 +0000 (21:42 +0100)]
SECURITY: distros' max embargo time is 14 days now

6 years agocurl tool: accept --compressed also if Brotli is enabled and zlib is not.
Patrick Monnerat [Thu, 8 Mar 2018 00:39:29 +0000 (01:39 +0100)]
curl tool: accept --compressed also if Brotli is enabled and zlib is not.

6 years agoTHANKS + mailmap: remove duplicates, fixup full names
Daniel Stenberg [Mon, 5 Mar 2018 10:48:41 +0000 (11:48 +0100)]
THANKS + mailmap: remove duplicates, fixup full names

6 years agoWolfSSL: adding TLSv1.3
sergii.kavunenko [Thu, 1 Mar 2018 18:10:36 +0000 (20:10 +0200)]
WolfSSL: adding TLSv1.3

Closes #2349

6 years agoRELEASE-NOTES/THANKS: synced with cc1d4c505
Daniel Stenberg [Sun, 4 Mar 2018 22:19:38 +0000 (23:19 +0100)]
RELEASE-NOTES/THANKS: synced with cc1d4c505

6 years agowinbuild: prefer documented zlib library names
richardthe3rd [Fri, 2 Mar 2018 22:13:42 +0000 (22:13 +0000)]
winbuild: prefer documented zlib library names

Check for existence of import and static libraries with documented names
and use them if they do. Fallback to previous names.

According to
https://github.com/madler/zlib/blob/master/win32/README-WIN32.txt on
Windows, the names of the import library is "zdll.lib" and static
library is "zlib.lib".

closes #2354

6 years agokrb5: use nondeprecated functions
Marcel Raad [Sat, 3 Mar 2018 19:25:24 +0000 (20:25 +0100)]
krb5: use nondeprecated functions

gss_seal/gss_unseal have been deprecated in favor of
gss_wrap/gss_unwrap with GSS-API v2 from January 1997 [1]. The first
version of "The Kerberos Version 5 GSS-API Mechanism" [2] from June
1996 already says "GSS_Wrap() (formerly GSS_Seal())" and
"GSS_Unwrap() (formerly GSS_Unseal())".

Use the nondeprecated functions to avoid deprecation warnings.

[1] https://tools.ietf.org/html/rfc2078
[2] https://tools.ietf.org/html/rfc1964

Closes https://github.com/curl/curl/pull/2356

6 years agocurl.1: mention how to add numerical IP addresses in NO_PROXY
Daniel Stenberg [Sun, 4 Mar 2018 18:57:43 +0000 (19:57 +0100)]
curl.1: mention how to add numerical IP addresses in NO_PROXY

6 years agoCURLOPT_NOPROXY.3: mention how to list numerical IPv6 addresses
Daniel Stenberg [Sat, 3 Mar 2018 17:28:07 +0000 (18:28 +0100)]
CURLOPT_NOPROXY.3: mention how to list numerical IPv6 addresses

6 years agoNO_PROXY: fix for IPv6 numericals in the URL
Daniel Stenberg [Sat, 3 Mar 2018 13:12:35 +0000 (14:12 +0100)]
NO_PROXY: fix for IPv6 numericals in the URL

Added test 1265 that verifies.

Reported-by: steelman on github
Fixes #2353
Closes #2355

6 years agobuild: get CFLAGS (including -werror) used for examples and tests
Daniel Stenberg [Fri, 23 Feb 2018 22:35:23 +0000 (23:35 +0100)]
build: get CFLAGS (including -werror) used for examples and tests

... so that the CI and more detects compiler warnings/errors properly!

Closes #2337

6 years agocurl_ctype: fix macro redefinition warnings
Marcel Raad [Sat, 3 Mar 2018 18:52:43 +0000 (19:52 +0100)]
curl_ctype: fix macro redefinition warnings

On MinGW and Cygwin, GCC and clang have been complaining about macro
redefinitions since 4272a0b0fc49a1ac0ceab5c4a365c9f6ab8bf8e2. Fix this
by undefining the macros before redefining them as suggested in
https://github.com/curl/curl/pull/2269.

Suggested-by: Daniel Stenberg
6 years agounit1307: proper cleanup on OOM to fix torture tests
Dan Fandrich [Fri, 2 Mar 2018 19:51:59 +0000 (20:51 +0100)]
unit1307: proper cleanup on OOM to fix torture tests

6 years agounit1309: fix warning on Windows x64
Marcel Raad [Sun, 25 Feb 2018 20:16:32 +0000 (21:16 +0100)]
unit1309: fix warning on Windows x64

When targeting x64, MinGW-w64 complains about conversions between
32-bit long and 64-bit pointers. Fix this by reusing the
GNUTLS_POINTER_TO_SOCKET_CAST / GNUTLS_SOCKET_TO_POINTER_CAST logic
from gtls.c, moving it to warnless.h as CURLX_POINTER_TO_INTEGER_CAST /
CURLX_INTEGER_TO_POINTER_CAST.

Closes https://github.com/curl/curl/pull/2341

6 years agotravis: update compiler versions
Marcel Raad [Tue, 27 Feb 2018 09:14:32 +0000 (10:14 +0100)]
travis: update compiler versions

Update clang to version 3.9 and GCC to version 6.

Closes https://github.com/curl/curl/pull/2345

6 years agodocs/MANUAL: formfind.pl is not accessible on the site anymore
Daniel Stenberg [Mon, 26 Feb 2018 19:12:23 +0000 (20:12 +0100)]
docs/MANUAL: formfind.pl is not accessible on the site anymore

Fixes #2342

6 years agocurl-openssl.m4: Fix version check for OpenSSL 1.1.1
Jay Satiro [Sat, 24 Feb 2018 08:18:15 +0000 (03:18 -0500)]
curl-openssl.m4: Fix version check for OpenSSL 1.1.1

- Add OpenSSL 1.1.1 to the header/library version lists.

- Detect OpenSSL 1.1.1 library using its function ERR_clear_last_mark,
  which was added in that version.

Prior to this change an erroneous header/library mismatch was caused by
lack of OpenSSL 1.1.1 detection. I tested using openssl-1.1.1-pre1.

6 years agolib655: silence compiler warning
Viktor Szakats [Fri, 23 Feb 2018 23:57:15 +0000 (23:57 +0000)]
lib655: silence compiler warning

Closes https://github.com/curl/curl/pull/2335

6 years agospelling fixes
Viktor Szakats [Fri, 23 Feb 2018 23:29:01 +0000 (23:29 +0000)]
spelling fixes

Detected using the `codespell` tool.

Also contains one URL protocol upgrade.

Closes https://github.com/curl/curl/pull/2334

6 years agoprojects/README: remove reference to dead IDN link/package
Daniel Stenberg [Fri, 23 Feb 2018 23:00:25 +0000 (00:00 +0100)]
projects/README: remove reference to dead IDN link/package

Reported-by: Stefan Kanthak and Rod Widdowson
Fixes #2325

6 years agowinbuild: Use macros for the names of some build utilities
Rod Widdowson [Fri, 23 Feb 2018 20:17:09 +0000 (15:17 -0500)]
winbuild: Use macros for the names of some build utilities

- Add macros to the top of the makefile for rc and mt utilities so that
  it is easier to change their locations.

Bug: https://curl.haxx.se/mail/lib-2018-02/0075.html
Reported-by: Stefan Kanthak
Closes https://github.com/curl/curl/issues/2329

6 years agoTODO: remove "sha-256 digest", added in 2b5b37cb9109e7c2
Daniel Stenberg [Fri, 23 Feb 2018 13:40:10 +0000 (14:40 +0100)]
TODO: remove "sha-256 digest", added in 2b5b37cb9109e7c2

6 years agocurl_share_setopt.3: connection cache is shared within multi handles
Daniel Stenberg [Fri, 23 Feb 2018 11:52:22 +0000 (12:52 +0100)]
curl_share_setopt.3: connection cache is shared within multi handles

6 years agowinbuild: Use CALL to run batch scripts
Rod Widdowson [Thu, 22 Feb 2018 15:25:18 +0000 (15:25 +0000)]
winbuild: Use CALL to run batch scripts

Co-authored-by: Stefan Kanthak
Closes https://github.com/curl/curl/issues/2330
Closes https://github.com/curl/curl/pull/2331

6 years agoos400: add curl_resolver_start_callback type to ILE/RPG binding
Patrick Monnerat [Thu, 22 Feb 2018 11:57:31 +0000 (12:57 +0100)]
os400: add curl_resolver_start_callback type to ILE/RPG binding

6 years agoform.d: rephrased somewhat, added two example command lines
Daniel Stenberg [Thu, 22 Feb 2018 07:28:05 +0000 (08:28 +0100)]
form.d: rephrased somewhat, added two example command lines

6 years agourl: Add option CURLOPT_RESOLVER_START_FUNCTION
Francisco Sedano [Wed, 14 Feb 2018 17:20:43 +0000 (17:20 +0000)]
url: Add option CURLOPT_RESOLVER_START_FUNCTION

- Add new option CURLOPT_RESOLVER_START_FUNCTION to set a callback that
  will be called every time before a new resolve request is started
  (ie before a host is resolved) with a pointer to backend-specific
  resolver data. Currently this is only useful for ares.

- Add new option CURLOPT_RESOLVER_START_DATA to set a user pointer to
  pass to the resolver start callback.

Closes https://github.com/curl/curl/pull/2311

6 years agolib: CURLOPT_HAPPY_EYEBALLS_TIMEOUT => CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
Jay Satiro [Wed, 21 Feb 2018 20:16:50 +0000 (15:16 -0500)]
lib: CURLOPT_HAPPY_EYEBALLS_TIMEOUT => CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS

- In keeping with the naming of our other connect timeout options rename
  CURLOPT_HAPPY_EYEBALLS_TIMEOUT to CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.

This change adds the _MS suffix since the option expects milliseconds.
This is more intuitive for our users since other connect timeout options
that expect milliseconds use _MS such as CURLOPT_TIMEOUT_MS,
CURLOPT_CONNECTTIMEOUT_MS, CURLOPT_ACCEPTTIMEOUT_MS.

The tool option already uses an -ms suffix, --happy-eyeballs-timeout-ms.

Follow-up to 2427d94 which added the lib and tool option yesterday.

Ref: https://github.com/curl/curl/pull/2260

6 years agosasl: prefer PLAIN mechanism over LOGIN
Patrick Monnerat [Wed, 21 Feb 2018 16:42:25 +0000 (17:42 +0100)]
sasl: prefer PLAIN mechanism over LOGIN

SASL PLAIN is a standard, LOGIN only a draft. The LOGIN draft says
PLAIN should be used instead if available.

6 years agoRELEASE-NOTES: synced with 2427d94c6
Daniel Stenberg [Tue, 20 Feb 2018 23:15:34 +0000 (00:15 +0100)]
RELEASE-NOTES: synced with 2427d94c6

6 years agourl: Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUT
Anders Bakken [Wed, 31 Jan 2018 00:33:51 +0000 (16:33 -0800)]
url: Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUT

- Add new option CURLOPT_HAPPY_EYEBALLS_TIMEOUT to set libcurl's happy
  eyeball timeout value.

- Add new optval macro CURL_HET_DEFAULT to represent the default happy
  eyeballs timeout value (currently 200 ms).

- Add new tool option --happy-eyeballs-timeout-ms to expose
  CURLOPT_HAPPY_EYEBALLS_TIMEOUT. The -ms suffix is used because the
  other -timeout options in the tool expect seconds not milliseconds.

Closes https://github.com/curl/curl/pull/2260

6 years agohostip: fix 'potentially uninitialized variable' warning
Jay Satiro [Tue, 20 Feb 2018 19:29:50 +0000 (14:29 -0500)]
hostip: fix 'potentially uninitialized variable' warning

Follow-up to 50d1b33.

Caught by AppVeyor.

6 years agoTODO: warning if curl version is not in sync with libcurl version
Daniel Stenberg [Tue, 20 Feb 2018 10:17:52 +0000 (11:17 +0100)]
TODO: warning if curl version is not in sync with libcurl version

6 years agoCURLOPT_RESOLVE: Add support for multiple IP addresses per entry
Anders Bakken [Wed, 31 Jan 2018 00:33:51 +0000 (16:33 -0800)]
CURLOPT_RESOLVE: Add support for multiple IP addresses per entry

This enables users to preresolve but still take advantage of happy
eyeballs and trying multiple addresses if some are not connecting.

Ref: https://github.com/curl/curl/pull/2260

6 years agoexamples/sftpuploadresume: resume upload via CURLOPT_APPEND
Sergio Borghese [Tue, 20 Feb 2018 08:27:41 +0000 (09:27 +0100)]
examples/sftpuploadresume: resume upload via CURLOPT_APPEND

URL: https://curl.haxx.se/mail/lib-2018-02/0072.html

6 years agocurl --version: show PSL if the run-time lib has it enabled
Daniel Stenberg [Sun, 18 Feb 2018 22:09:24 +0000 (23:09 +0100)]
curl --version: show PSL if the run-time lib has it enabled

... not of the #define was set at build-time!

6 years agoTODO: "Support in-memory certs/ca certs/keys"
Daniel Stenberg [Sun, 18 Feb 2018 21:45:17 +0000 (22:45 +0100)]
TODO: "Support in-memory certs/ca certs/keys"

removed SSLKEYLOGFILE support (fixed)

removed "consider SSL patches" (outdated)

Closes #2310

6 years agoCURLOPT_HEADER.3: clarify problems with different data sizes
Daniel Stenberg [Fri, 16 Feb 2018 10:23:12 +0000 (11:23 +0100)]
CURLOPT_HEADER.3: clarify problems with different data sizes

6 years agotest1556: verify >16KB headers to the header callback
Daniel Stenberg [Fri, 16 Feb 2018 09:12:46 +0000 (10:12 +0100)]
test1556: verify >16KB headers to the header callback

6 years agoheader callback: don't chop headers into smaller pieces
Daniel Stenberg [Fri, 16 Feb 2018 09:23:44 +0000 (10:23 +0100)]
header callback: don't chop headers into smaller pieces

Reported-by: Guido Berhoerster
Fixes #2314
Closes #2316

6 years agotest1154: verify that long HTTP headers get rejected
Daniel Stenberg [Thu, 15 Feb 2018 22:33:49 +0000 (23:33 +0100)]
test1154: verify that long HTTP headers get rejected

6 years agohttp: fix the max header length detection logic
Daniel Stenberg [Fri, 16 Feb 2018 08:49:33 +0000 (09:49 +0100)]
http: fix the max header length detection logic

Previously, it would only check for max length if the existing alloc
buffer was to small to fit it, which often would make the header still
get used.

Reported-by: Guido Berhoerster
Bug: https://curl.haxx.se/mail/lib-2018-02/0056.html

Closes #2315

6 years agoCURLOPT_HEADERFUNCTION.3: fix typo from d939226813
Daniel Stenberg [Fri, 16 Feb 2018 15:25:18 +0000 (16:25 +0100)]
CURLOPT_HEADERFUNCTION.3: fix typo from d939226813

Reported-by: Erik Johansson
Bug: https://github.com/curl/curl/commit/d9392268131c1b8d18dec3fa30e0bded833a5db7#commitcomment-27607495

6 years agoCURLOPT_HEADERFUNCTION.3: mention folded headers
Daniel Stenberg [Fri, 16 Feb 2018 11:11:23 +0000 (12:11 +0100)]
CURLOPT_HEADERFUNCTION.3: mention folded headers

6 years agoTODO: 1.1 Option to refuse usernames in URLs
Daniel Stenberg [Fri, 16 Feb 2018 08:39:20 +0000 (09:39 +0100)]
TODO: 1.1 Option to refuse usernames in URLs

Also expanded the CURL_REFUSE_CLEARTEXT section with more ideas.

6 years agoTODO: 1.7 Support HTTP/2 for HTTP(S) proxies
Daniel Stenberg [Fri, 16 Feb 2018 08:24:28 +0000 (09:24 +0100)]
TODO: 1.7 Support HTTP/2 for HTTP(S) proxies

6 years agossh: add two missing state names
Daniel Stenberg [Thu, 15 Feb 2018 12:40:35 +0000 (13:40 +0100)]
ssh: add two missing state names

The list of state names (used in debug builds) was out of sync in
relation to the list of states (used in all builds).

I now added an assert to make sure the sizes of the two lists match, to
aid in detecting this mistake better in the future.

Regression since c92d2e14cf, shipped in 7.58.0.

Reported-by: Somnath Kundu
Fixes #2312
Closes #2313