]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agoGnuTLS: Always send client cert
jethrogb [Thu, 20 Feb 2020 19:36:25 +0000 (20:36 +0100)] 
GnuTLS: Always send client cert

TLS servers may request a certificate from the client. This request
includes a list of 0 or more acceptable issuer DNs. The client may use
this list to determine which certificate to send. GnuTLS's default
behavior is to not send a client certificate if there is no
match. However, OpenSSL's default behavior is to send the configured
certificate. The `GNUTLS_FORCE_CLIENT_CERT` flag mimics OpenSSL
behavior.

Authored-by: jethrogb on github
Fixes #1411
Closes #4958

5 years agogithub action: add CIFuzz
Leo Neat [Fri, 21 Feb 2020 00:17:50 +0000 (16:17 -0800)] 
github action: add CIFuzz

Closes #4960

5 years agocleanup: comment typos
Daniel Stenberg [Thu, 20 Feb 2020 14:18:38 +0000 (15:18 +0100)] 
cleanup: comment typos

Spotted by 'codespell'

Closes #4957

5 years agowin32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions
Steve Holme [Wed, 19 Feb 2020 07:46:22 +0000 (07:46 +0000)] 
win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions

Whilst lib\md4.c used this pre-processor, lib\md5.c and
src\tool_metalink.c did not and simply relied on the WIN32
pre-processor directive.

Reviewed-by: Marcel Raad
Closes #4955

5 years agoconnect: remove some spurious infof() calls
Daniel Stenberg [Wed, 19 Feb 2020 09:30:23 +0000 (10:30 +0100)] 
connect: remove some spurious infof() calls

As they were added primarily for debugging, they provide little use for
users.

Closes #4951

5 years agoHTTP-COOKIES: mention that a trailing newline is required
Daniel Stenberg [Tue, 18 Feb 2020 13:23:04 +0000 (14:23 +0100)] 
HTTP-COOKIES: mention that a trailing newline is required

... so that we know we got the whole and not a partial line.

Also, changed the formatting of the fields away from a table again since
the table format requires a github-markdown tool version that we don't
run on the web server atm.

Reported-by: Sunny Bean
Fixes #4946
Closes #4947

5 years agonit: Copyright year out of date
Daniel Stenberg [Wed, 19 Feb 2020 06:53:54 +0000 (07:53 +0100)] 
nit: Copyright year out of date

Follow-up to 1fc0617dcc

5 years agotool_util: Improve Windows version of tvnow()
Jay Satiro [Fri, 24 Jan 2020 08:34:52 +0000 (03:34 -0500)] 
tool_util: Improve Windows version of tvnow()

- Change tool_util.c tvnow() for Windows to match more closely to
  timeval.c Curl_now().

- Create a win32 init function for the tool, since some initialization
  is required for the tvnow() changes.

Prior to this change the monotonic time function used by curl in Windows
was determined at build-time and not runtime. That was a problem because
when curl was built targeted for compatibility with old versions of
Windows (eg _WIN32_WINNT < 0x0600) it would use GetTickCount which wraps
every 49.7 days that Windows has been running.

This change makes curl behave similar to libcurl's tvnow function, which
determines at runtime whether the OS is Vista+ and if so calls
QueryPerformanceCounter instead. (Note QueryPerformanceCounter is used
because it has higher resolution than the more obvious candidate
GetTickCount64). The changes to tvnow are basically a copy and paste but
the types in some cases are different.

Ref: https://github.com/curl/curl/issues/3309

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

5 years agoSOCKS: fix typo in printf formatting
Daniel Stenberg [Tue, 18 Feb 2020 11:54:02 +0000 (12:54 +0100)] 
SOCKS: fix typo in printf formatting

Follow-up to 4a4b63daa

Reported-by: Peter Piekarski
Bug: https://github.com/curl/curl/commit/4a4b63daaa01ef59b131d91e8e6e6dfe275c0f08#r37351330

5 years agoCURLOPT_REDIR_PROTOCOLS.3: update the DEFAULT section
Daniel Stenberg [Tue, 18 Feb 2020 06:39:19 +0000 (07:39 +0100)] 
CURLOPT_REDIR_PROTOCOLS.3: update the DEFAULT section

to be in sync with the description above

Reported-by: Joonas Kuorilehto
Fixes #4943
Closes #4945

5 years agodocs/GOVERNANCE: refreshed + added "donations" and "commercial support"
Daniel Stenberg [Tue, 18 Feb 2020 08:18:28 +0000 (09:18 +0100)] 
docs/GOVERNANCE: refreshed + added "donations" and "commercial support"

5 years agoaltsvc: make saving the cache an atomic operation
Daniel Stenberg [Mon, 17 Feb 2020 22:01:48 +0000 (23:01 +0100)] 
altsvc: make saving the cache an atomic operation

... by writing the file to temp name then rename to the final when done.

Assisted-by: Jay Satiro
Fixes #4936
Closes #4942

5 years agorename: a new file for Curl_rename()
Daniel Stenberg [Mon, 17 Feb 2020 21:55:34 +0000 (22:55 +0100)] 
rename: a new file for Curl_rename()

And make the cookie save function use it.

5 years agocookies: make saving atomic with a rename
Daniel Stenberg [Fri, 14 Feb 2020 13:36:50 +0000 (14:36 +0100)] 
cookies: make saving atomic with a rename

Saves the file as "[filename].[8 random hex digits].tmp" and renames
away the extension when done.

Co-authored-by: Jay Satiro
Reported-by: Mike Frysinger
Fixes #4914
Closes #4926

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 17 Feb 2020 09:58:48 +0000 (10:58 +0100)] 
RELEASE-NOTES: synced

5 years agosocks: make the connect phase non-blocking
Daniel Stenberg [Fri, 14 Feb 2020 15:16:54 +0000 (16:16 +0100)] 
socks: make the connect phase non-blocking

Removes two entries from KNOWN_BUGS.

Closes #4907

5 years agomulti: if Curl_readwrite sets 'comeback' use expire, not loop
Daniel Stenberg [Fri, 14 Feb 2020 15:54:06 +0000 (16:54 +0100)] 
multi: if Curl_readwrite sets 'comeback' use expire, not loop

Otherwise, a very fast single transfer ricks starving out other
concurrent transfers.

Closes #4927

5 years agoftp: convert 'sock_accepted' to a plain boolean
Daniel Stenberg [Fri, 14 Feb 2020 23:00:45 +0000 (00:00 +0100)] 
ftp: convert 'sock_accepted' to a plain boolean

This was an array indexed with sockindex but it was only ever used for
the secondary socket.

Closes #4929

5 years agoCURLINFO_COOKIELIST.3: Fix example
Jay Satiro [Sat, 15 Feb 2020 23:17:31 +0000 (18:17 -0500)] 
CURLINFO_COOKIELIST.3: Fix example

Prior to this change the example would try to import cookies from stdin,
which wasn't what was intended.

Reported-by: 3dyd@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/4930

5 years agoTODO: Paged searches on LDAP server
Daniel Stenberg [Fri, 14 Feb 2020 22:05:38 +0000 (23:05 +0100)] 
TODO: Paged searches on LDAP server

Closes #4452

5 years agoTODO: CURLOPT_SSL_CTX_FUNCTION for LDAPS
Daniel Stenberg [Fri, 14 Feb 2020 22:03:21 +0000 (23:03 +0100)] 
TODO: CURLOPT_SSL_CTX_FUNCTION for LDAPS

Closes #4108

5 years agoazure: disable brotli on the macos debug-builds
Daniel Stenberg [Fri, 14 Feb 2020 13:10:56 +0000 (14:10 +0100)] 
azure: disable brotli on the macos debug-builds

Because of:

brotli/decode.h:204:33: error: variable length array used [-Werror,-Wvla]
    const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],

Closes #4925

5 years agotool_home: Fix the copyright year being out of date
Steve Holme [Thu, 13 Feb 2020 00:40:08 +0000 (00:40 +0000)] 
tool_home: Fix the copyright year being out of date

Follow up to 9dc350b6.

5 years agotool_homedir: Change GetEnv() to use libcurl's curl_getenv()
Jay Satiro [Wed, 29 Jan 2020 08:23:55 +0000 (03:23 -0500)] 
tool_homedir: Change GetEnv() to use libcurl's curl_getenv()

- Deduplicate GetEnv() code.

- On Windows change ultimate call to use Windows API
  GetEnvironmentVariable() instead of C runtime getenv().

Prior to this change both libcurl and the tool had their own GetEnv
which over time diverged. Now the tool's GetEnv is a wrapper around
curl_getenv (libcurl API function which is itself a wrapper around
libcurl's GetEnv).

Furthermore this change fixes a bug in that Windows API
GetEnvironmentVariable() is called instead of C runtime getenv() to get
the environment variable since some changes aren't always visible to the
latter.

Reported-by: Christoph M. Becker
Fixes https://github.com/curl/curl/issues/4774
Closes https://github.com/curl/curl/pull/4863

5 years agostrerror.h: Copyright year out of date
Daniel Stenberg [Wed, 12 Feb 2020 22:07:04 +0000 (23:07 +0100)] 
strerror.h: Copyright year out of date

Follow-up to 1c4fa67e8a8fcf6

5 years agostrerror: Increase STRERROR_LEN 128 -> 256
Jay Satiro [Wed, 12 Feb 2020 21:48:16 +0000 (16:48 -0500)] 
strerror: Increase STRERROR_LEN 128 -> 256

STRERROR_LEN is the constant used throughout the library to set the size
of the buffer on the stack that the curl strerror functions write to.

Prior to this change some extended length Windows error messages could
be truncated.

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

5 years agomulti: fix outdated comment
Jay Satiro [Sun, 9 Feb 2020 08:15:13 +0000 (03:15 -0500)] 
multi: fix outdated comment

- Do not say that conn->data is "cleared" by multi_done().

If the connection is in use then multi_done assigns another easy handle
still using the connection to conn->data, therefore in that case it is
not cleared.

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

5 years agoeasy: remove dead code
Jay Satiro [Sun, 9 Feb 2020 07:41:33 +0000 (02:41 -0500)] 
easy: remove dead code

multi is already assigned to data->multi by curl_multi_add_handle.

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

5 years agocreate-dirs.d: mention the mode
Daniel Stenberg [Wed, 12 Feb 2020 21:30:45 +0000 (22:30 +0100)] 
create-dirs.d: mention the mode

Reported-by: Dan Jacobson
Fixes #4766
Closes #4916

5 years agoCURLOPT_ALTSVC_CTRL.3: fix the DEFAULT wording
Daniel Stenberg [Tue, 11 Feb 2020 14:42:25 +0000 (15:42 +0100)] 
CURLOPT_ALTSVC_CTRL.3: fix the DEFAULT wording

Assisted-by: Jay Satiro
Reported-by: Craig Andrews
Fixes #4909
Closes #4910

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 10 Feb 2020 07:49:27 +0000 (08:49 +0100)] 
RELEASE-NOTES: synced

5 years agosmtp: Simplify the MAIL command and avoid a duplication of send strings
Steve Holme [Sun, 9 Feb 2020 15:50:57 +0000 (15:50 +0000)] 
smtp: Simplify the MAIL command and avoid a duplication of send strings

This avoids the duplication of strings when the optional AUTH and SIZE
parameters are required. It also assists with the modifications that
are part of #4892.

Closes #4903

5 years agoaltsvc: keep a copy of the file name to survive handle reset
Daniel Stenberg [Sun, 9 Feb 2020 14:28:03 +0000 (15:28 +0100)] 
altsvc: keep a copy of the file name to survive handle reset

The alt-svc cache survives a call to curl_easy_reset fine, but the file
name to use for saving the cache was cleared. Now the alt-svc cache has
a copy of the file name to survive handle resets.

Added test 1908 to verify.

Reported-by: Craig Andrews
Fixes #4898
Closes #4902

5 years agourl: Include the failure reason when curl_win32_idn_to_ascii() fails
Steve Holme [Sun, 9 Feb 2020 04:37:52 +0000 (04:37 +0000)] 
url: Include the failure reason when curl_win32_idn_to_ascii() fails

Provide the failure reason in the failf() info just as we do for the
libidn2 version of code.

Closes #4899

5 years agoasyn-thread: remove dead code
Jay Satiro [Sun, 9 Feb 2020 07:25:44 +0000 (02:25 -0500)] 
asyn-thread: remove dead code

5 years agogithub: Instructions to post "uname -a" on Unix systems in issues
Emil Engler [Sat, 8 Feb 2020 10:23:54 +0000 (11:23 +0100)] 
github: Instructions to post "uname -a" on Unix systems in issues

Closes #4896

5 years agoconfigure.ac: fix comments about --with-quiche
Cristian Greco [Sat, 8 Feb 2020 14:28:33 +0000 (14:28 +0000)] 
configure.ac: fix comments about --with-quiche

A simple s/nghttp3/quiche in some comments of --with-quiche.
Looks like a copy-paste error from --with-nghttp3.

Closes #4897

5 years agochecksrc.bat: Fix not being able to run script from the main curl directory
Steve Holme [Fri, 7 Feb 2020 16:51:09 +0000 (16:51 +0000)] 
checksrc.bat: Fix not being able to run script from the main curl directory

If the script was ran from the main curl directory rather then the
projects directory then the script would simply exit without error:

C:\url> projects\checksrc.bat

The user would either need to change to the projects directory,
explicitly specify the current working directory, or perform a
oneline hacky workaround:

C:\url> cd projects
C:\url\projects> checksrc.bat

C:\url> checksrc.bat %cd%

C:\url> pushd projects & checksrc.bat & popd

Closes #4894

5 years agodigest: Do not quote algorithm in HTTP authorisation
Pierre-Yves Bigourdan [Thu, 6 Feb 2020 15:43:06 +0000 (15:43 +0000)] 
digest: Do not quote algorithm in HTTP authorisation

RFC 7616 section 3.4 (The Authorization Header Field) states that "For
historical reasons, a sender MUST NOT generate the quoted string syntax
for the following parameters: algorithm, qop, and nc". This removes the
quoting for the algorithm parameter.

Reviewed-by: Steve Holme
Closes #4890

5 years agoftp: remove the duplicated user/password struct fields
Daniel Stenberg [Thu, 6 Feb 2020 14:59:18 +0000 (15:59 +0100)] 
ftp: remove the duplicated user/password struct fields

Closes #4887

5 years agoftp: remove superfluous checking for crlf in user or pwd
Daniel Stenberg [Thu, 6 Feb 2020 10:36:53 +0000 (11:36 +0100)] 
ftp: remove superfluous checking for crlf in user or pwd

... as this is already done much earlier in the URL parser.

Also add test case 894 that verifies that pop3 with an encodedd CR in
the user name is rejected.

Closes #4887

5 years agontlm_wb: Use Curl_socketpair() for greater portability
Steve Holme [Wed, 5 Feb 2020 16:08:56 +0000 (16:08 +0000)] 
ntlm_wb: Use Curl_socketpair() for greater portability

Reported-by: Daniel Stenberg
Closes #4886

5 years agocontributors: Also include people who contributed to curl-www
Frank Gevaerts [Wed, 5 Feb 2020 10:45:47 +0000 (11:45 +0100)] 
contributors: Also include people who contributed to curl-www

Closes #4884

5 years agocontrithanks: Use the most recent tag by default
Frank Gevaerts [Wed, 5 Feb 2020 10:34:07 +0000 (11:34 +0100)] 
contrithanks: Use the most recent tag by default

(similar to 5296abe)

Closes #4883

5 years agoscripts: use last set tag if none given
Daniel Stenberg [Wed, 5 Feb 2020 06:48:18 +0000 (07:48 +0100)] 
scripts: use last set tag if none given

Makes 'delta' and 'contributors.sh' easier to use.

Make the delta script invoke contrithanks to get current number of
contributors instead of counting THANKS, for accuracy.

Closes #4881

5 years agoftp: shrink temp buffers used for PORT
Daniel Stenberg [Tue, 4 Feb 2020 22:27:39 +0000 (23:27 +0100)] 
ftp: shrink temp buffers used for PORT

These two stack based buffers only need to be 46 + 66 bytes instead of
256 + 1024.

Closes #4880

5 years agocurl: error on --alt-svc use w/o support
Daniel Stenberg [Tue, 4 Feb 2020 16:32:55 +0000 (17:32 +0100)] 
curl: error on --alt-svc use w/o support

Make the tool check for alt-svc support at run-time and return error
accordingly if not present when the option is used.

Reported-by: Harry Sintonen
Closes #4878

5 years agodocs/HTTP3: add --enable-alt-svc to curl's configure
Daniel Stenberg [Tue, 4 Feb 2020 23:25:12 +0000 (00:25 +0100)] 
docs/HTTP3: add --enable-alt-svc to curl's configure

5 years agoRELEASE-PROCEDURE: feature win is closed post-release a few days
Daniel Stenberg [Tue, 4 Feb 2020 15:29:28 +0000 (16:29 +0100)] 
RELEASE-PROCEDURE: feature win is closed post-release a few days

We've tried to uphold this already but let's make it official by
publicly stating this is the way we do it.

Closes #4877

5 years agoaltsvc: set h3 version at a common single spot
Daniel Stenberg [Tue, 4 Feb 2020 14:12:44 +0000 (15:12 +0100)] 
altsvc: set h3 version at a common single spot

... and move the #ifdefs out of the functions. Addresses the fact they
were different before this change.

Reported-by: Harry Sintonen
Closes #4876

5 years agoaltsvc: improved header parser
Harry Sintonen [Tue, 4 Feb 2020 04:21:58 +0000 (06:21 +0200)] 
altsvc: improved header parser

- Fixed the flag parsing to apply to specific alternative entry only, as
per RFC. The earlier code would also get totally confused by
multiprotocol header, parsing flags from the wrong part of the header.

- Fixed the parser terminating on unknown protocols, instead of skipping
them.

- Fixed a busyloop when protocol-id was present without an equal sign.

Closes #4875

5 years agongtcp2: fixed to only use AF_INET6 when ENABLE_IPV6
Harry Sintonen [Mon, 3 Feb 2020 22:58:38 +0000 (00:58 +0200)] 
ngtcp2: fixed to only use AF_INET6 when ENABLE_IPV6

5 years agodocs/HTTP3: update the OpenSSL branch to use for ngtcp2
Daniel Stenberg [Tue, 4 Feb 2020 14:05:57 +0000 (15:05 +0100)] 
docs/HTTP3: update the OpenSSL branch to use for ngtcp2

Reported-by: James Fuller
5 years agontlm: Pass the Curl_easy structure to the private winbind functions
Steve Holme [Wed, 8 May 2019 08:36:51 +0000 (09:36 +0100)] 
ntlm: Pass the Curl_easy structure to the private winbind functions

...rather than the full conndata structure.

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 4 Feb 2020 09:33:38 +0000 (10:33 +0100)] 
RELEASE-NOTES: synced

5 years agotool_operhlp: Copyright year out of date, should be 2020
Daniel Stenberg [Tue, 4 Feb 2020 07:29:41 +0000 (08:29 +0100)] 
tool_operhlp: Copyright year out of date, should be 2020

Follow-up from 2bc373740a3

5 years agocurl: avoid using strlen for testing if a string is empty
Orgad Shaneh [Mon, 3 Feb 2020 09:42:46 +0000 (11:42 +0200)] 
curl: avoid using strlen for testing if a string is empty

Closes #4873

5 years agontlm: Ensure the HTTP header data is not stored in the challenge/response
Steve Holme [Wed, 8 May 2019 23:30:09 +0000 (00:30 +0100)] 
ntlm: Ensure the HTTP header data is not stored in the challenge/response

5 years agoopenssl: remove redundant assignment
Marcel Raad [Sun, 2 Feb 2020 12:35:54 +0000 (13:35 +0100)] 
openssl: remove redundant assignment

Fixes a scan-build failure on Bionic.

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

5 years agotravis: update non-OpenSSL Linux jobs to Bionic
Marcel Raad [Sun, 2 Feb 2020 08:56:21 +0000 (09:56 +0100)] 
travis: update non-OpenSSL Linux jobs to Bionic

For the OpenSSL builds, test 323 [TLS-SRP to non-TLS-SRP server] is
failing with "curl returned 52, when expecting 35".

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

5 years agocirrus: Add some missing semicolons
Dan Fandrich [Mon, 3 Feb 2020 11:27:30 +0000 (12:27 +0100)] 
cirrus: Add some missing semicolons

Newlines aren't preserved in this section so they're needed to separate
commands. The exports luckily worked anyway as a single long line, but
erroneously exported a variable called "export"
[skip ci]

5 years agocleanup: fix typos and wording in docs and comments
Pedro Monreal [Sun, 2 Feb 2020 08:49:28 +0000 (09:49 +0100)] 
cleanup: fix typos and wording in docs and comments

Closes #4869
Reviewed-by: Emil Engler and Daniel Gustafsson
5 years agontlm: Move the winbind data into the NTLM data structure
Steve Holme [Tue, 7 May 2019 22:36:52 +0000 (23:36 +0100)] 
ntlm: Move the winbind data into the NTLM data structure

To assist with adding winbind support to the SASL NTLM authentication,
move the winbind specific data out of conndata into ntlmdata.

5 years agoquiche: Copyright year out of date
Daniel Stenberg [Thu, 30 Jan 2020 18:13:01 +0000 (19:13 +0100)] 
quiche: Copyright year out of date

Follow-up to 7fc63d72333a

5 years agoaltsvc: use h3-25
Daniel Stenberg [Thu, 30 Jan 2020 15:02:27 +0000 (16:02 +0100)] 
altsvc: use h3-25

Closes #4868

5 years agoquiche: update to draft-25
Alessandro Ghedini [Thu, 30 Jan 2020 13:06:31 +0000 (13:06 +0000)] 
quiche: update to draft-25

Closes #4867

5 years agongtcp2: update to git master and its draft-25 support
Daniel Stenberg [Wed, 29 Jan 2020 14:56:16 +0000 (15:56 +0100)] 
ngtcp2: update to git master and its draft-25 support

Closes #4865

5 years agocookie: check __Secure- and __Host- case sensitively
Daniel Stenberg [Wed, 29 Jan 2020 08:57:50 +0000 (09:57 +0100)] 
cookie: check __Secure- and __Host- case sensitively

While most keywords in cookies are case insensitive, these prefixes are
specified explicitly to get checked "with a case-sensitive match".

(From the 6265bis document in progress)

Ref: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-04
Closes #4864

5 years agoKNOWN_BUGS: Multiple methods in a single WWW-Authenticate: header
Daniel Stenberg [Wed, 29 Jan 2020 06:57:42 +0000 (07:57 +0100)] 
KNOWN_BUGS: Multiple methods in a single WWW-Authenticate: header

5 years agooauth2-bearer.d: works for HTTP too
Daniel Stenberg [Tue, 28 Jan 2020 21:27:15 +0000 (22:27 +0100)] 
oauth2-bearer.d: works for HTTP too

Reported-by: Mischa Salle
Bug: https://curl.haxx.se/mail/lib-2020-01/0070.html
Closes #4862

5 years agomulti_done: if multiplexed, make conn->data point to another transfer
Daniel Stenberg [Mon, 27 Jan 2020 21:50:33 +0000 (22:50 +0100)] 
multi_done: if multiplexed, make conn->data point to another transfer

... since the current transfer is being killed. Setting to NULL is
wrong, leaving it pointing to 'data' is wrong since that handle might be
about to get freed.

Fixes #4845
Closes #4858
Reported-by: dmitrmax on github
5 years agolocation.d: the method change is from POST to GET only
Daniel Stenberg [Tue, 28 Jan 2020 09:41:10 +0000 (10:41 +0100)] 
location.d: the method change is from POST to GET only

Not from generic non-GET to GET.

Reported-by: Andrius Merkys
Ref: #4859
Closes #4861

5 years agourlapi: guess scheme correct even with credentials given
Daniel Stenberg [Mon, 27 Jan 2020 16:28:40 +0000 (17:28 +0100)] 
urlapi: guess scheme correct even with credentials given

In the "scheme-less" parsing case, we need to strip off credentials
first before we guess scheme based on the host name!

Assisted-by: Jay Satiro
Fixes #4856
Closes #4857

5 years agoglobal_init: move the IPv6 works status bool to multi handle
Daniel Stenberg [Sun, 26 Jan 2020 16:51:01 +0000 (17:51 +0100)] 
global_init: move the IPv6 works status bool to multi handle

Previously it was stored in a global state which contributed to
curl_global_init's thread unsafety. This boolean is now instead figured
out in curl_multi_init() and stored in the multi handle. Less effective,
but thread safe.

Closes #4851

5 years agoREADME: mention that the docs is in docs/
Jay Satiro [Mon, 27 Jan 2020 08:15:26 +0000 (09:15 +0100)] 
README: mention that the docs is in docs/

Reported-by: Austin Green
Fixes #4830
Closes #4853

5 years agocurl.h: define CURL_WIN32 on windows
Daniel Stenberg [Mon, 27 Jan 2020 10:37:33 +0000 (11:37 +0100)] 
curl.h: define CURL_WIN32 on windows

... so that the subsequent logic below can use a single known define to know
when built on Windows (as we don't define WIN32 anymore).

Follow-up to 1adebe7886ddf20b

Reported-by: crazydef on github
Assisted-by: Marcel Raad
Fixes #4854
Closes #4855

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 27 Jan 2020 08:44:33 +0000 (09:44 +0100)] 
RELEASE-NOTES: synced

5 years agourldata: do string enums without #ifdefs for build scripts
Jon Rumsey [Mon, 27 Jan 2020 08:23:43 +0000 (09:23 +0100)] 
urldata: do string enums without #ifdefs for build scripts

... and check for inconsistencies for OS400 at build time with the new
chkstrings tool.

Closes #4822

5 years agocurl: make the -# spaceship bar not wrap the line
Daniel Stenberg [Sat, 25 Jan 2020 15:46:41 +0000 (16:46 +0100)] 
curl: make the -# spaceship bar not wrap the line

The fixed-point math made us lose precision and thus a too high index
value could be used for outputting the hashtags which could overwrite
the newline.

The fix increases the precision in the sine table (*100) and the
associated position math.

Reported-by: Andrew Potter
Fixes #4849
Closes #4850

5 years agoglobal_init: assume the EINTR bit by default
Daniel Stenberg [Thu, 23 Jan 2020 12:39:27 +0000 (13:39 +0100)] 
global_init: assume the EINTR bit by default

- Removed from global_init since it isn't thread-safe. The symbol will
  still remain to not break compiles, it just won't have any effect going
  forward.

- make the internals NOT loop on EINTR (the opposite from previously).
  It only risks returning from the select/poll/wait functions early, and that
  should be risk-free.

Closes #4840

5 years agoconn: do not reuse connection if SOCKS proxy credentials differ
Peter Piekarski [Mon, 20 Jan 2020 17:02:09 +0000 (18:02 +0100)] 
conn: do not reuse connection if SOCKS proxy credentials differ

Closes #4835

5 years agollist: removed unused Curl_llist_move()
Daniel Stenberg [Thu, 23 Jan 2020 08:15:39 +0000 (09:15 +0100)] 
llist: removed unused Curl_llist_move()

(and the corresponding unit test)

Closes #4842

5 years agoconncache: removed unused Curl_conncache_bundle_size()
Daniel Stenberg [Thu, 23 Jan 2020 08:03:29 +0000 (09:03 +0100)] 
conncache: removed unused Curl_conncache_bundle_size()

5 years agostrcase: turn Curl_raw_tolower into static
Daniel Stenberg [Thu, 23 Jan 2020 08:01:25 +0000 (09:01 +0100)] 
strcase: turn Curl_raw_tolower into static

Only ever used from within this file.

5 years agosingleuse.pl: support new API functions, fix curl_dbg_ handling
Daniel Stenberg [Thu, 23 Jan 2020 07:59:22 +0000 (08:59 +0100)] 
singleuse.pl: support new API functions, fix curl_dbg_ handling

5 years agowolfssh: make it init properly via Curl_ssh_init()
Daniel Stenberg [Thu, 23 Jan 2020 19:05:22 +0000 (20:05 +0100)] 
wolfssh: make it init properly via Curl_ssh_init()

Closes #4846

5 years agoform.d: fix two minor typos
Aron Rotteveel [Thu, 23 Jan 2020 08:24:30 +0000 (09:24 +0100)] 
form.d: fix two minor typos

Closes #4843

5 years agoopenssl: make CURLINFO_CERTINFO not truncate x509v3 fields
Daniel Stenberg [Wed, 22 Jan 2020 09:29:44 +0000 (10:29 +0100)] 
openssl: make CURLINFO_CERTINFO not truncate x509v3 fields

Avoid "reparsing" the content and instead deliver more exactly what is
provided in the certificate and avoid truncating the data after 512
bytes as done previously. This no longer removes embedded newlines.

Fixes #4837
Reported-by: bnfp on github
Closes #4841

5 years agoCURLOPT_PROXY_SSL_OPTIONS.3: Sync with CURLOPT_SSL_OPTIONS.3
Jay Satiro [Thu, 23 Jan 2020 07:51:52 +0000 (02:51 -0500)] 
CURLOPT_PROXY_SSL_OPTIONS.3: Sync with CURLOPT_SSL_OPTIONS.3

- Copy CURLOPT_SSL_OPTIONS.3 description to CURLOPT_PROXY_SSL_OPTIONS.3.

Prior to this change CURLSSLOPT_NO_PARTIALCHAIN was missing from the
CURLOPT_PROXY_SSL_OPTIONS description.

5 years agomk-ca-bundle: add support for CKA_NSS_SERVER_DISTRUST_AFTER
Daniel Stenberg [Mon, 20 Jan 2020 21:23:44 +0000 (22:23 +0100)] 
mk-ca-bundle: add support for CKA_NSS_SERVER_DISTRUST_AFTER

For now, no cert in the bundle actually sets a date there...

Co-Authored-by: Jay Satiro
Reported-by: Christian Heimes
Fixes #4834
Closes #4836

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 21 Jan 2020 14:15:31 +0000 (15:15 +0100)] 
RELEASE-NOTES: synced

5 years agosmtp: Allow RCPT TO command to fail for some recipients
Pavel Volgarev [Tue, 14 Jan 2020 22:22:38 +0000 (17:22 -0500)] 
smtp: Allow RCPT TO command to fail for some recipients

Introduces CURLOPT_MAIL_RCPT_ALLLOWFAILS.

Verified with the new tests 3002-3007

Closes #4816

5 years agocopyright: fix year ranges
Daniel Stenberg [Tue, 21 Jan 2020 09:34:44 +0000 (10:34 +0100)] 
copyright: fix year ranges

follow-up from dea17b519d (one of these days I'll learn to check before
I push)

5 years agohttp: move "oauth_bearer" from connectdata to Curl_easy
nao [Tue, 21 Jan 2020 09:30:37 +0000 (10:30 +0100)] 
http: move "oauth_bearer" from connectdata to Curl_easy

Fixes the bug where oauth_bearer gets deallocated when we re-use a
connection.

Closes #4824

5 years agocurl: Let -D merge headers in one file again
Emil Engler [Tue, 21 Jan 2020 08:23:21 +0000 (09:23 +0100)] 
curl: Let -D merge headers in one file again

Closes #4762
Fixes #4753

5 years agodata.d: remove "Multiple files can also be specified"
Daniel Stenberg [Tue, 21 Jan 2020 07:39:47 +0000 (08:39 +0100)] 
data.d: remove "Multiple files can also be specified"

It is superfluous and could even be misleading.

Bug: https://curl.haxx.se/mail/archive-2020-01/0016.html
Reported-by: Mike Norton
Closes #4832

5 years agoCMake: support specifying the target Windows version
Marcel Raad [Tue, 14 Jan 2020 19:28:20 +0000 (20:28 +0100)] 
CMake: support specifying the target Windows version

Previously, it was only possible to set it to Windows Vista or XP by
setting the option `ENABLE_INET_PTON` to `ON` resp. `OFF`.
Use a new cache variable `CURL_TARGET_WINDOWS_VERSION` to be able to
explicitly set the target Windows version. `ENABLE_INET_PTON` is
ignored in this case.

Ref: https://github.com/curl/curl/pull/1639#issuecomment-313039352
Ref: https://github.com/curl/curl/pull/4607#issuecomment-557541456
Closes https://github.com/curl/curl/pull/4815

5 years agohttp.h: Copyright year out of date, should be 2020
Daniel Stenberg [Mon, 20 Jan 2020 07:37:21 +0000 (08:37 +0100)] 
http.h: Copyright year out of date, should be 2020

Follow-up to 7ff9222ced8c

5 years agoHTTP: increase EXPECT_100_THRESHOLD to 1Mb
加藤郁之 [Tue, 14 Jan 2020 14:34:56 +0000 (23:34 +0900)] 
HTTP: increase EXPECT_100_THRESHOLD to 1Mb

Mentioned: https://curl.haxx.se/mail/lib-2020-01/0050.html

Closes #4814

5 years agoROADMAP: thread-safe `curl_global_init()`
Daniel Stenberg [Fri, 17 Jan 2020 11:58:35 +0000 (12:58 +0100)] 
ROADMAP: thread-safe `curl_global_init()`

I'd like to see this happen.