]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 years agocurl: add --fail-with-body
Daniel Stenberg [Thu, 11 Feb 2021 07:30:39 +0000 (08:30 +0100)] 
curl: add --fail-with-body

Prevent both --fail and --fail-with-body on the same command line.

Verify with test 349, 360 and 361.

Closes #6449

4 years agoTODO: remove HSTS
Daniel Stenberg [Wed, 10 Feb 2021 21:54:33 +0000 (22:54 +0100)] 
TODO: remove HSTS

Provided now since commit 7385610d0c74

4 years agotests: Fix tests failing due to change in curl --help
Jay Satiro [Wed, 10 Feb 2021 20:57:26 +0000 (15:57 -0500)] 
tests: Fix tests failing due to change in curl --help

Follow-up to parent 3183217 which added add missing <mode> argument to
--create-file-mode <mode>.

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

4 years agotool_help: add missing argument for --create-file-mode
Jay Satiro [Wed, 10 Feb 2021 19:10:49 +0000 (14:10 -0500)] 
tool_help: add missing argument for --create-file-mode

Prior to this change the required argument was not shown in curl --help.

before:
     --create-file-mode File mode for created files

after:
     --create-file-mode <mode> File mode (octal) for created files

Reported-by: ZimCodes@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/6590

4 years agocreate-file-mode.d: add missing Arg tag
Jay Satiro [Wed, 10 Feb 2021 18:57:40 +0000 (13:57 -0500)] 
create-file-mode.d: add missing Arg tag

Prior to this change the required argument was not shown.

curl.1 before: --create-file-mode
curl.1 after: --create-file-mode <mode>

Reported-by: ZimCodes@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/6590

4 years agogsasl: fix errors/warnings building against libgsasl
Viktor Szakats [Wed, 10 Feb 2021 18:50:36 +0000 (18:50 +0000)] 
gsasl: fix errors/warnings building against libgsasl

- also fix an indentation
- make Curl_auth_gsasl_token() use CURLcode (by Daniel Stenberg)

Ref: https://github.com/curl/curl/pull/6372#issuecomment-776118711
Ref: https://github.com/curl/curl/pull/6588

Reviewed-by: Jay Satiro
Assisted-by: Daniel Stenberg
Reviewed-by: Simon Josefsson
Closes #6587

4 years agoMakefile.m32: add support for libgsasl dependency
Viktor Szakats [Wed, 10 Feb 2021 18:46:57 +0000 (18:46 +0000)] 
Makefile.m32: add support for libgsasl dependency

Reviewed-by: Marcel Raad
Closes #6586

4 years agongtcp2: clarify calculation precedence
Marcel Raad [Sun, 7 Feb 2021 10:53:56 +0000 (11:53 +0100)] 
ngtcp2: clarify calculation precedence

As suggested by Codacy/cppcheck.

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

4 years agoserver: remove redundant condition
Marcel Raad [Sun, 7 Feb 2021 10:45:16 +0000 (11:45 +0100)] 
server: remove redundant condition

`end` is always non-null here.

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

4 years agolib: remove redundant code
Marcel Raad [Sun, 7 Feb 2021 08:29:59 +0000 (09:29 +0100)] 
lib: remove redundant code

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

4 years agomqttd: remove unused variable
Marcel Raad [Sat, 6 Feb 2021 10:46:22 +0000 (11:46 +0100)] 
mqttd: remove unused variable

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

4 years agotool_paramhlp: reduce variable scope
Marcel Raad [Sat, 6 Feb 2021 10:40:18 +0000 (11:40 +0100)] 
tool_paramhlp: reduce variable scope

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

4 years agotests: reduce variable scopes
Marcel Raad [Sat, 6 Feb 2021 10:30:09 +0000 (11:30 +0100)] 
tests: reduce variable scopes

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

4 years agolib: reduce variable scopes
Marcel Raad [Sat, 6 Feb 2021 10:21:53 +0000 (11:21 +0100)] 
lib: reduce variable scopes

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

4 years agoftp: fix Codacy/cppcheck warning about null pointer arithmetic
Marcel Raad [Sat, 6 Feb 2021 09:26:38 +0000 (10:26 +0100)] 
ftp: fix Codacy/cppcheck warning about null pointer arithmetic

Increment `bytes` only if it is non-null.

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

4 years agongtcp2: adapt to the new recv_datagram callback
Daniel Stenberg [Tue, 9 Feb 2021 22:25:20 +0000 (23:25 +0100)] 
ngtcp2: adapt to the new recv_datagram callback

4 years agoquiche: fix build error: use 'int' for port number
Daniel Stenberg [Tue, 9 Feb 2021 22:21:13 +0000 (23:21 +0100)] 
quiche: fix build error: use 'int' for port number

Follow-up to cb2dc1ba8

4 years agoftp: add 'list_only' to the transfer state struct
Daniel Stenberg [Mon, 8 Feb 2021 15:40:34 +0000 (16:40 +0100)] 
ftp: add 'list_only' to the transfer state struct

and rename it from 'ftp_list_only' since it is also used for SSH and
POP3. The state is updated internally for 'type=D' FTP URLs.

Added test case 1570 to verify.

Closes #6578

4 years agoftp: add 'prefer_ascii' to the transfer state struct
Daniel Stenberg [Mon, 8 Feb 2021 14:56:10 +0000 (15:56 +0100)] 
ftp: add 'prefer_ascii' to the transfer state struct

... and make sure the code never updates 'set.prefer_ascii' as it breaks
handle reuse which should use the setting as the user specified it.

Added test 1569 to verify: it first makes an FTP transfer with ';type=A'
and then another without type on the same handle and the second should
then use binary. Previously, curl failed this.

Closes #6578

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 9 Feb 2021 10:35:47 +0000 (11:35 +0100)] 
RELEASE-NOTES: synced

4 years agovtls: initial implementation of rustls backend
Jacob Hoffman-Andrews [Sun, 13 Dec 2020 07:55:09 +0000 (23:55 -0800)] 
vtls: initial implementation of rustls backend

This adds a new TLS backend, rustls. It uses the C-to-rustls bindings
from https://github.com/abetterinternet/crustls.

Rustls is at https://github.com/ctz/rustls/.

There is still a fair bit to be done, like sending CloseNotify on
connection shutdown, respecting CAPATH, and properly indicating features
like "supports TLS 1.3 ciphersuites." But it works well enough to make
requests and receive responses.

Blog post for context:
https://www.abetterinternet.org/post/memory-safe-curl/

Closes #6350

4 years agosasl: support SCRAM-SHA-1 and SCRAM-SHA-256 via libgsasl
Simon Josefsson [Thu, 24 Dec 2020 18:48:45 +0000 (19:48 +0100)] 
sasl: support SCRAM-SHA-1 and SCRAM-SHA-256 via libgsasl

Closes #6372

4 years agolib: use int type for more port variables
Jay Satiro [Mon, 1 Feb 2021 07:10:07 +0000 (02:10 -0500)] 
lib: use int type for more port variables

This is a follow-up to 764c6bd. Prior to that change port variables
were usually type long.

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

4 years agotool_writeout: refactor write-out and write-out json
Jay Satiro [Thu, 28 Jan 2021 23:56:50 +0000 (18:56 -0500)] 
tool_writeout: refactor write-out and write-out json

- Deduplicate the logic used by write-out and write-out json.

Rather than have separate writeLong, writeString, etc, logic for
each of write-out and write-out json instead have respective shared
functions that can output either format and a 'use_json' parameter to
indicate whether it is json that is output.

This will make it easier to maintain. Rather than have to go through
two sets of logic now we only have to go through one.

- Support write-out %{errormsg} and %{exitcode} in json.

- Clarify in the doc that %{exitcode} is the exit code of the transfer.

Prior to this change it just said "The numerical exitcode" which
implies it's the exit code of the tool, and it's not necessarily that.

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

4 years agolib: drop USE_SOCKETPAIR in favor of CURL_DISABLE_SOCKETPAIR
Jay Satiro [Mon, 25 Jan 2021 06:27:13 +0000 (01:27 -0500)] 
lib: drop USE_SOCKETPAIR in favor of CURL_DISABLE_SOCKETPAIR

.. since the former is undocumented and they both do the same thing.

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

4 years agocurl_multibyte: fall back to local code page stat/access on Windows
Jay Satiro [Sun, 24 Jan 2021 23:22:05 +0000 (18:22 -0500)] 
curl_multibyte: fall back to local code page stat/access on Windows

If libcurl is built with Unicode support for Windows then it is assumed
the filename string is Unicode in UTF-8 encoding and it is converted to
UTF-16 to be passed to the wide character version of the respective
function (eg wstat). However the filename string may actually be in the
local encoding so, even if it successfully converted to UTF-16, if it
could not be stat/accessed then try again using the local code page
version of the function (eg wstat fails try stat).

We already do this with fopen (ie wfopen fails try fopen), so I think it
makes sense to extend it to stat and access functions.

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

4 years agofile: Support unicode urls on windows
Stephan Szabo [Wed, 20 Jan 2021 18:08:49 +0000 (10:08 -0800)] 
file: Support unicode urls on windows

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

4 years agocmake: fix import library name for non-MS compiler on Windows
Vincent Torri [Thu, 19 Nov 2020 18:34:43 +0000 (19:34 +0100)] 
cmake: fix import library name for non-MS compiler on Windows

- Use _imp.lib suffix only for Microsoft's compiler (MSVC).

Prior to this change library suffix _imp.lib was used for the import
library on Windows regardless of compiler.

With this change the other compilers should now use their default
suffix which should be .dll.a.

This change is motivated by the usage of pkg-config on MSYS2.
Indeed, when 'pkg-config --libs libcurl' is used, -lcurl is
passed to ld. The documentation of ld on Windows :

https://sourceware.org/binutils/docs/ld/WIN32.html

lists, in the 'direct linking to a dll' section, the pattern
of the searched import library, and libcurl_imp.lib is not there.

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

4 years agourldata: move 'followlocation' to UrlState
Daniel Stenberg [Mon, 8 Feb 2021 22:00:21 +0000 (23:00 +0100)] 
urldata: move 'followlocation' to UrlState

As this is a state variable it does not belong in UserDefined which is
used to store values set by the user.

Closes #6582

4 years agohttp_proxy: fix typo in http_proxy.c
Ikko Ashimine [Tue, 9 Feb 2021 05:22:09 +0000 (14:22 +0900)] 
http_proxy: fix typo in http_proxy.c

settting -> setting

Closes #6583

4 years agotests/server: Bump MAX_TAG_LEN to 200
Fabian Keil [Wed, 20 Jan 2021 11:32:14 +0000 (12:32 +0100)] 
tests/server: Bump MAX_TAG_LEN to 200

This is useful for tests containing HTML inside of <data> sections.
For <img> tags it's not uncommon to be longer than the previous
limit of 79 bytes.

An example of a previously problem-causing tag is:
<img src="http://config.privoxy.org/send-banner?type=auto" border="0" title="Killed-http://www.privoxy.org/images/privoxy.png-by-size" width="88" height="31">
which is needed for a Privoxy test for the banners-by-size filter.

Previously it caused server failures like:
12:29:05.786961 ====> Client connect
12:29:05.787116 accept_connection 3 returned 4
12:29:05.787194 accept_connection 3 returned 0
12:29:05.787285 Read 119 bytes
12:29:05.787345 Process 119 bytes request
12:29:05.787407 Got request: GET /banners-by-size/9 HTTP/1.1
12:29:05.787464 Requested test number 9 part 0
12:29:05.787686 getpart() failed with error: -2
12:29:05.787744 - request found to be complete (9)
12:29:05.787912 getpart() failed with error: -2
12:29:05.788048 Wrote request (119 bytes) input to log/server.input
12:29:05.788157 Send response test9 section <data>
12:29:05.788443 getpart() failed with error: -2
12:29:05.788498 instructed to close connection after server-reply
12:29:05.788550 ====> Client disconnect 0
12:29:05.871448 exit_signal_handler: 15
12:29:05.871714 signalled to die
12:29:05.872040 ========> IPv4 sws (port 21108 pid: 51758) exits with signal (15)

4 years agotests/badsymbols.pl: when opening '$incdir' fails include it in the error message
Fabian Keil [Fri, 28 Feb 2020 09:46:22 +0000 (10:46 +0100)] 
tests/badsymbols.pl: when opening '$incdir' fails include it in the error message

4 years agoruntests.1: document -o, -P, -L, and -E
Fabian Keil [Mon, 18 Jan 2021 08:21:54 +0000 (09:21 +0100)] 
runtests.1: document -o, -P, -L, and -E

4 years agoruntests.pl: add %TESTNUMBER variable to make copying tests more convenient
Fabian Keil [Mon, 16 Jun 2014 14:03:00 +0000 (16:03 +0200)] 
runtests.pl: add %TESTNUMBER variable to make copying tests more convenient

4 years agoruntests.pl: add an -o option to change internal variables
Fabian Keil [Thu, 9 Oct 2014 13:48:19 +0000 (15:48 +0200)] 
runtests.pl: add an -o option to change internal variables

runtests.pl has lots of internal variables one might want to
change in certain situations, but adding a dedicated option
for every single one of them isn't practical.

Usage:
./runtests.pl -o TESTDIR=$privoxy_curl_test_dir -o HOSTIP=10.0.0.1 ...

4 years agoruntests.pl: cleanups
Fabian Keil [Thu, 15 Nov 2012 14:57:29 +0000 (15:57 +0100)] 
runtests.pl: cleanups

- show the summarized test result in the last line of the report
- do not use $_ after mapping it to a named variable
  Doing that makes the code harder to follow.
- log the restraints sorted by the number of their occurrences
- fix language when logging restraints that only occured once
- let runhttpserver() use $TESTDIR instead of $srcdir
  ... so it works if a non-default $TESTDIR is being used.

4 years agoruntests.pl: add an -E option to specify an exclude file
Fabian Keil [Sat, 17 Nov 2012 11:12:42 +0000 (12:12 +0100)] 
runtests.pl: add an -E option to specify an exclude file

It can contain additional restraints for test numbers,
keywords and tools.

The idea is to let third parties like the Privoxy project
distribute an exclude file with their tarballs that specifies
which curl tests are not expected to work when using Privoxy
as a proxy, without having to fork the whole curl test suite.

The syntax could be changed to be extendable and maybe
more closely reflect the "curl test" syntax. Currently
it's a bunch of lines like these:

test:$TESTNUMBER:Reason why this test with number $TESTNUMBER should be skipped
keyword:$KEYWORD:Reason why tests whose keywords contain the $KEYWORD should be skipped
tool:$TOOL:Reason why tests with tools that contain $TOOL should be skipped

To specify multiple $TESTNUMBERs, $KEYWORDs and $TOOLs
on a single line, split them with commas.

4 years agoruntests.pl: add -L parameter to require additional perl libraries
Fabian Keil [Thu, 5 Jun 2014 10:56:36 +0000 (12:56 +0200)] 
runtests.pl: add -L parameter to require additional perl libraries

This is useful to change the behaviour of the script without
having to modify the file itself, for example to use a custom
compareparts() function that ignores header differences that
are expected to occur when an external proxy is being used.

Such differences are proxy-specific and thus the modifications
should be maintained together with the proxy.

4 years agoruntests.pl: add a -P option to specify an external proxy
Fabian Keil [Sun, 29 Aug 2010 12:12:30 +0000 (14:12 +0200)] 
runtests.pl: add a -P option to specify an external proxy

... that should be used when executing the tests.

The assumption is that the proxy is an HTTP proxy.

This option should be used together with -L to provide
a customized compareparts() version that knows which
proxy-specific header differences should be ignored.

This option doesn't work for all test types yet.

4 years agotests: fixup several tests
Fabian Keil [Fri, 28 Feb 2020 14:00:03 +0000 (15:00 +0100)] 
tests: fixup several tests

missing CRs and modified %hostip

lib556/test556: use a real HTTP version to make test reuse more convenient

make sure the weekday in Date headers matches the date

test61: replace stray "^M" (5e 4d) at the end of a cookie with a '^M' (0d)

Gets the test working with external proxies like Privoxy again.

Closes #6463

4 years agoftp: never set data->set.ftp_append outside setopt
Daniel Stenberg [Mon, 8 Feb 2021 15:21:31 +0000 (16:21 +0100)] 
ftp: never set data->set.ftp_append outside setopt

Since the set value then risks getting used like that when the easy
handle is reused by the application.

Also: renamed the struct field from 'ftp_append' to 'remote_append'
since it is also used for SSH protocols.

Closes #6579

4 years agourldata: remove the 'rtspversion' field
Daniel Stenberg [Mon, 8 Feb 2021 16:04:50 +0000 (17:04 +0100)] 
urldata: remove the 'rtspversion' field

from struct connectdata and the corresponding code in http.c that set
it. It was never used for anything!

Closes #6581

4 years agoCURLOPT_QUOTE.3: clarify that libcurl doesn't parse what's sent
Daniel Stenberg [Mon, 8 Feb 2021 15:51:20 +0000 (16:51 +0100)] 
CURLOPT_QUOTE.3: clarify that libcurl doesn't parse what's sent

... so passed in commands may confuse libcurl's knowledge of state.

Reported-by: Bodo Bergmann
Fixes #6577
Closes #6580

4 years agovtls: factor out Curl_ssl_getsock to field of Curl_ssl
Jacob Hoffman-Andrews [Wed, 3 Feb 2021 01:54:52 +0000 (17:54 -0800)] 
vtls: factor out Curl_ssl_getsock to field of Curl_ssl

Closes #6558

4 years agoRELEASE-PROCEDURE: remove old release dates, add new
Daniel Stenberg [Mon, 8 Feb 2021 13:04:05 +0000 (14:04 +0100)] 
RELEASE-PROCEDURE: remove old release dates, add new

4 years agodocs/SSL-PROBLEMS: enhanced
Daniel Stenberg [Fri, 5 Feb 2021 09:50:51 +0000 (10:50 +0100)] 
docs/SSL-PROBLEMS: enhanced

Elaborate on the intermediate cert issue, and mention that anything
below TLS 1.2 is generally considered insecure these days.

Closes #6572

4 years agoTHANKS: remove a Jon Rumsey dupe
Daniel Stenberg [Fri, 5 Feb 2021 12:23:26 +0000 (13:23 +0100)] 
THANKS: remove a Jon Rumsey dupe

4 years agodocs: fix FILE example url in --metalink documentation
nimaje [Fri, 5 Feb 2021 12:22:35 +0000 (13:22 +0100)] 
docs: fix FILE example url in --metalink documentation

In a url after <scheme>:// follows the possibly empty authority part
till the next /, so that url missed a /.

Closes #6573
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agohostip: fix build with sync resolver
Daniel Stenberg [Thu, 4 Feb 2021 22:40:54 +0000 (23:40 +0100)] 
hostip: fix build with sync resolver

Reported-by: David Goerger
Follow-up from 8335c6417
Fixes #6566
Closes #6568

4 years agomailmap: Jon Rumsey
Daniel Stenberg [Fri, 5 Feb 2021 07:46:11 +0000 (08:46 +0100)] 
mailmap: Jon Rumsey

4 years agogskit: correct the gskit_send() prototype
Jon Rumsey [Thu, 4 Feb 2021 23:02:18 +0000 (23:02 +0000)] 
gskit: correct the gskit_send() prototype

gskit_send() first paramater is a pointer to Curl_easy not connectdata
struct.

Closes #6570
Fixes #6569

4 years agourldata: fix build without HTTP and MQTT
Daniel Stenberg [Thu, 4 Feb 2021 14:04:18 +0000 (15:04 +0100)] 
urldata: fix build without HTTP and MQTT

Reported-by: Joseph Chen
Fixes #6562
Closes #6563

4 years agoftp: avoid SIZE when asking for a TYPE A file
Daniel Stenberg [Thu, 4 Feb 2021 12:05:03 +0000 (13:05 +0100)] 
ftp: avoid SIZE when asking for a TYPE A file

... as we ignore it anyway because servers don't report the correct size
and proftpd even blatantly returns a 550.

Updates a set of tests accordingly.

Reported-by: awesomenode on github
Fixes #6564
Closes #6565

4 years agopingpong: rename the curl_pp_transfer enum to use PP prefix
Daniel Stenberg [Thu, 4 Feb 2021 12:06:17 +0000 (13:06 +0100)] 
pingpong: rename the curl_pp_transfer enum to use PP prefix

Using an FTP prefix for PP provided functionality was misleading.

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 4 Feb 2021 21:51:26 +0000 (22:51 +0100)] 
RELEASE-NOTES: synced

... and bump pending version to 7.75.1 (for now)

4 years agobuild: fix --disable-http-auth
Jay Satiro [Thu, 4 Feb 2021 19:49:56 +0000 (14:49 -0500)] 
build: fix --disable-http-auth

Broken since 215db08 (precedes 7.75.0).

Reported-by: Benbuck Nason
Fixes https://github.com/curl/curl/issues/6567

4 years agobuild: fix --disable-dateparse
Jay Satiro [Thu, 4 Feb 2021 19:13:00 +0000 (14:13 -0500)] 
build: fix --disable-dateparse

Broken since 215db08 (precedes 7.75.0).

Bug: https://curl.se/mail/lib-2021-02/0008.html
Reported-by: Firefox OS
4 years agoOS400: update for CURLOPT_AWS_SIGV4
jonrumsey [Wed, 3 Feb 2021 20:58:26 +0000 (20:58 +0000)] 
OS400: update for CURLOPT_AWS_SIGV4

chkstrings fails because a new string option that could require codepage
conversion has been added.

Closes #6561
Fixes #6560

4 years agoBUG-BOUNTY: removed the cooperation mention
Daniel Stenberg [Wed, 3 Feb 2021 13:24:09 +0000 (14:24 +0100)] 
BUG-BOUNTY: removed the cooperation mention

4 years agoRELEASE-NOTES: synced curl-7_75_0
Daniel Stenberg [Wed, 3 Feb 2021 07:02:36 +0000 (08:02 +0100)] 
RELEASE-NOTES: synced

4 years agoTHANKS: added contributors from 7.75.0
Daniel Stenberg [Wed, 3 Feb 2021 07:02:36 +0000 (08:02 +0100)] 
THANKS: added contributors from 7.75.0

4 years agocopyright: fix year ranges in need of updates
Daniel Stenberg [Wed, 3 Feb 2021 07:02:36 +0000 (08:02 +0100)] 
copyright: fix year ranges in need of updates

4 years agoTODO: remove items for next SONAME bump etc
Daniel Stenberg [Tue, 2 Feb 2021 07:46:37 +0000 (08:46 +0100)] 
TODO: remove items for next SONAME bump etc

We want to avoid that completely, so we don't plan for things after such
an event.

4 years agongtcp2: Fix build error due to change in ngtcp2_settings
Jay Satiro [Mon, 1 Feb 2021 07:40:42 +0000 (02:40 -0500)] 
ngtcp2: Fix build error due to change in ngtcp2_settings

- Separate ngtcp2_transport_params.

ngtcp2/ngtcp2@05d7adc made ngtcp2_transport_params separate from
ngtcp2_settings.

ngtcp2 master is required to build curl with http3 support.

Closes #6554

4 years agovtls: remove md5sum
Daniel Stenberg [Mon, 1 Feb 2021 22:02:06 +0000 (23:02 +0100)] 
vtls: remove md5sum

As it is not used anymore.

Reported-by: Jacob Hoffman-Andrews
Bug: https://curl.se/mail/lib-2021-02/0000.html

Closes #6557

4 years agoquiche: don't use primary_ip / primary_port
Alessandro Ghedini [Mon, 1 Feb 2021 13:13:37 +0000 (13:13 +0000)] 
quiche: don't use primary_ip / primary_port

Closes #6555

4 years agotravis: enable quiche's FFI feature
Alessandro Ghedini [Mon, 1 Feb 2021 13:13:12 +0000 (13:13 +0000)] 
travis: enable quiche's FFI feature

4 years agohttp: improve AWS HTTP v4 Signature auth
Dmitry Wagin [Mon, 25 Jan 2021 14:02:09 +0000 (17:02 +0300)] 
http: improve AWS HTTP v4 Signature auth

- Add support services without region and service prefixes in
the URL endpoint (ex. Min.IO, GCP, Yandex Cloud, Mail.Ru Cloud Solutions, etc)
by providing region and service parameters via aws-sigv4 option.
- Add [:region[:service]] suffix to aws-sigv4 option;
- Fix memory allocation errors.
- Refactor memory management.
- Use Curl_http_method instead() STRING_CUSTOMREQUEST.
- Refactor canonical headers generating.
- Remove repeated sha256_to_hex() usage.
- Add some docs fixes.
- Add some codestyle fixes.
- Add overloaded strndup() for debug - curl_dbg_strndup().
- Update tests.

Closes #6524

4 years agohyper: fix CONNECT to set 'data' as userdata
Daniel Stenberg [Sat, 30 Jan 2021 16:51:00 +0000 (17:51 +0100)] 
hyper: fix CONNECT to set 'data' as userdata

Follow-up to 14e075d1a7fd

4 years agoconnect: fix compile errors in `Curl_conninfo_local`
Layla [Fri, 29 Jan 2021 19:21:35 +0000 (14:21 -0500)] 
connect: fix compile errors in `Curl_conninfo_local`

.. for the `#else` (`!HAVE_GETSOCKNAME`) case

Fixes https://github.com/curl/curl/issues/6548
Closes #6549

Signed-off-by: Layla <layla@insightfulvr.com>
4 years agotransfer: fix GCC 10 warning with flag '-Wint-in-bool-context'
Michał Antoniak [Fri, 29 Jan 2021 08:20:17 +0000 (09:20 +0100)] 
transfer: fix GCC 10 warning with flag '-Wint-in-bool-context'

... and return the error code from the Curl_mime_rewind call.

Closes #6537

4 years agoavoid warning: enum constant in boolean context
Michał Antoniak [Wed, 27 Jan 2021 13:40:24 +0000 (14:40 +0100)] 
avoid warning: enum constant in boolean context

4 years agocopyright: fix missing year (range) updates
Daniel Stenberg [Fri, 29 Jan 2021 13:35:13 +0000 (14:35 +0100)] 
copyright: fix missing year (range) updates

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 29 Jan 2021 10:11:35 +0000 (11:11 +0100)] 
RELEASE-NOTES: synced

4 years agoopenssl: lowercase the hostname before using it for SNI
Daniel Stenberg [Thu, 28 Jan 2021 19:16:55 +0000 (20:16 +0100)] 
openssl: lowercase the hostname before using it for SNI

... because it turns out several servers out there don't actually behave
correctly otherwise in spite of the fact that the SNI field is
specifically said to be case insensitive in RFC 6066 section 3.

Reported-by: David Earl
Fixes #6540
Closes #6543

4 years agoKNOWN_BUGS: cmake: ExternalProject_Add does not set CURL_CA_PATH
Daniel Stenberg [Thu, 28 Jan 2021 08:27:41 +0000 (09:27 +0100)] 
KNOWN_BUGS: cmake: ExternalProject_Add does not set CURL_CA_PATH

Closes #6313

4 years agoKNOWN_BUGS: Multi perform hangs waiting for threaded resolver
Daniel Stenberg [Thu, 28 Jan 2021 08:22:51 +0000 (09:22 +0100)] 
KNOWN_BUGS: Multi perform hangs waiting for threaded resolver

Closes #4852

4 years agoKNOWN_BUGS: "pulseUI VPN client" is known to be buggy
Daniel Stenberg [Thu, 28 Jan 2021 07:24:13 +0000 (08:24 +0100)] 
KNOWN_BUGS: "pulseUI VPN client" is known to be buggy

First entry in the new section "applications" for known problems in
libcurl using applications.

Closes #6306

4 years agotool_writeout: make %{errormsg} blank for no errors
Daniel Stenberg [Wed, 27 Jan 2021 15:39:24 +0000 (16:39 +0100)] 
tool_writeout: make %{errormsg} blank for no errors

Closes #6539

4 years agobuild: fix djgpp builds
Gisle Vanem [Sun, 27 Dec 2020 10:49:26 +0000 (11:49 +0100)] 
build: fix djgpp builds

- Update build instructions in packages/DOS/README

- Extend 'VPATH' with 'vquic' and 'vssh'.

- Allow 'Makefile.dist' to build both 'lib' and 'src'.

- Allow using the Windows hosted djgpp cross compiler to build for MSDOS
  under Windows.

- 'USE_SSL' -> 'USE_OPENSSL'

- Added a 'link_EXE' macro. Etc, etc.

- Linking 'curl.exe' needs '$(CURLX_CFILES)' too.

- Do not pick-up '../lib/djgpp/*.o' files. Recompile locally.

- Generate a gzipped 'tool_hugehelp.c' if 'USE_ZLIB=1'.

- Remove 'djgpp-clean'

- Adapt to new C-ares directory structure

- Use conditional variable assignments

Clarify the 'conditional variable assignment' in 'common.dj'.

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

4 years agohyper: fix typo in c-hyper.c
Ikko Ashimine [Wed, 27 Jan 2021 14:07:35 +0000 (23:07 +0900)] 
hyper: fix typo in c-hyper.c

settting -> setting

Closes #6538

4 years agolibssh2: fix CURL_LIBSSH2_DEBUG-enabled build
Daniel Stenberg [Wed, 27 Jan 2021 10:43:21 +0000 (11:43 +0100)] 
libssh2: fix CURL_LIBSSH2_DEBUG-enabled build

Follow-up to 2dcc940959772a

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/2dcc940959772a652f6813fb6bd3092095a4877b#commitcomment-46420088

4 years agoasyn-thread: fix build for when getaddrinfo missing
Jay Satiro [Tue, 26 Jan 2021 23:57:43 +0000 (18:57 -0500)] 
asyn-thread: fix build for when getaddrinfo missing

This is a follow-up to 8315343 which several days ago moved the resolver
pointer into the async struct but did not update the code that uses it
when getaddrinfo is not present.

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

4 years agourldata: move 'ints' to the end of 'connectdata'
Daniel Stenberg [Tue, 26 Jan 2021 14:09:22 +0000 (15:09 +0100)] 
urldata: move 'ints' to the end of 'connectdata'

To optimize storage slightly.

Closes #6534

4 years agourldata: store ip version in a single byte
Daniel Stenberg [Tue, 26 Jan 2021 13:59:01 +0000 (14:59 +0100)] 
urldata: store ip version in a single byte

Closes #6534

4 years agourldata: remove duplicate 'upkeep_interval_ms' from connectdata
Daniel Stenberg [Tue, 26 Jan 2021 13:23:36 +0000 (14:23 +0100)] 
urldata: remove duplicate 'upkeep_interval_ms' from connectdata

... and rely only on the value already set in Curl_easy.

Closes #6534

4 years agourldata: remove 'local_ip' from the connectdata struct
Daniel Stenberg [Tue, 26 Jan 2021 13:14:06 +0000 (14:14 +0100)] 
urldata: remove 'local_ip' from the connectdata struct

As the info is already stored in the transfer handle anyway, there's no
need to carry around a duplicate buffer for the life-time of the handle.

Closes #6534

4 years agourldata: remove duplicate port number storage
Daniel Stenberg [Tue, 26 Jan 2021 10:04:33 +0000 (11:04 +0100)] 
urldata: remove duplicate port number storage

... and use 'int' for ports. We don't use 'unsigned short' since -1 is
still often used internally to signify "unknown value" and 0 - 65535 are
all valid port numbers.

Closes #6534

4 years agourldata: remove the duplicate 'ip_addr_str' field
Daniel Stenberg [Tue, 26 Jan 2021 09:46:49 +0000 (10:46 +0100)] 
urldata: remove the duplicate 'ip_addr_str' field

... as the numerical IP address is already stored and kept in 'primary_ip'.

Closes #6534

4 years agoselect: convert Curl_select() to private static function
Daniel Stenberg [Tue, 26 Jan 2021 08:32:49 +0000 (09:32 +0100)] 
select: convert Curl_select() to private static function

The old function should not be used anywhere anymore (the only remaining
gskit use has to be fixed to instead use Curl_poll or none at all).

The static function version is now called our_select() and is only built
if necessary.

Closes #6531

4 years agoCurl_chunker: shrink the struct
Daniel Stenberg [Mon, 25 Jan 2021 16:42:59 +0000 (17:42 +0100)] 
Curl_chunker: shrink the struct

... by removing a field, converting the hex index into a byte and
rearranging the order. Cuts it down from 48 bytes to 32 on x86_64.

Closes #6527

4 years agocurl: include the file name in --xattr/--remote-time error msgs
Daniel Stenberg [Tue, 26 Jan 2021 16:02:39 +0000 (17:02 +0100)] 
curl: include the file name in --xattr/--remote-time error msgs

4 years agocurl: s/config->global/global/ in single_transfer()
Daniel Stenberg [Tue, 26 Jan 2021 15:55:50 +0000 (16:55 +0100)] 
curl: s/config->global/global/ in single_transfer()

4 years agocurl: move fprintf outputs to warnf
Daniel Stenberg [Tue, 26 Jan 2021 15:52:03 +0000 (16:52 +0100)] 
curl: move fprintf outputs to warnf

For setting and getting time of the download. To make the outputs
respect --silent etc.

Reported-by: Viktor Szakats
Fixes #6533
Closes #6535

4 years agongtcp2: Fix http3 upload stall
Tatsuhiro Tsujikawa [Mon, 25 Jan 2021 08:59:22 +0000 (17:59 +0900)] 
ngtcp2: Fix http3 upload stall

Closes #6521

4 years agongtcp2: Fix stack buffer overflow
Tatsuhiro Tsujikawa [Mon, 25 Jan 2021 09:39:00 +0000 (18:39 +0900)] 
ngtcp2: Fix stack buffer overflow

Closes #6521

4 years agowarnless.h: remove the prototype for curlx_ultosi
Daniel Stenberg [Tue, 26 Jan 2021 15:32:03 +0000 (16:32 +0100)] 
warnless.h: remove the prototype for curlx_ultosi

Follow-up to 217552503ff3

4 years agowarnless: remove curlx_ultosi
Daniel Stenberg [Tue, 26 Jan 2021 08:26:48 +0000 (09:26 +0100)] 
warnless: remove curlx_ultosi

... not used anywhere

Closes #6530

4 years agolib: remove conn->data uses
Patrick Monnerat [Sun, 24 Jan 2021 17:57:02 +0000 (18:57 +0100)] 
lib: remove conn->data uses

Closes #6515

4 years agopingpong: remove the 'conn' struct member
Daniel Stenberg [Mon, 25 Jan 2021 16:23:33 +0000 (17:23 +0100)] 
pingpong: remove the 'conn' struct member

... as it's superfluous now when Curl_easy is passed in and we can
derive the connection from that instead and avoid the duplicate copy.

Closes #6525