]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 years agotransfer: remove conn->data use
Daniel Stenberg [Tue, 19 Jan 2021 09:24:35 +0000 (10:24 +0100)] 
transfer: remove conn->data use

Closes #6486

4 years agoquic: remove conn->data use
Daniel Stenberg [Tue, 19 Jan 2021 08:48:40 +0000 (09:48 +0100)] 
quic: remove conn->data use

Closes #6485

4 years agoAdd test1181: Proxy request with --proxy-header "Connection: Keep-Alive"
Fabian Keil [Sat, 16 Jan 2021 14:55:08 +0000 (15:55 +0100)] 
Add test1181: Proxy request with --proxy-header "Connection: Keep-Alive"

4 years agoAdd test1180: Proxy request with -H "Proxy-Connection: Keep-Alive"
Fabian Keil [Sat, 16 Jan 2021 14:45:28 +0000 (15:45 +0100)] 
Add test1180: Proxy request with -H "Proxy-Connection: Keep-Alive"

At the moment the test fails as curl sends two Proxy-Connection
headers.

4 years agoc-hyper: avoid duplicated Proxy-Connection headers
Daniel Stenberg [Mon, 18 Jan 2021 09:35:47 +0000 (10:35 +0100)] 
c-hyper: avoid duplicated Proxy-Connection headers

4 years agohttp: make providing Proxy-Connection header not cause duplicated headers
Daniel Stenberg [Sun, 17 Jan 2021 17:20:06 +0000 (18:20 +0100)] 
http: make providing Proxy-Connection header not cause duplicated headers

Fixes test 1180

Bug: https://curl.se/mail/lib-2021-01/0095.html
Reported-by: Fabian Keil
Closes #6472

4 years agoruntests: preprocess DISABLED to allow conditionals
Daniel Stenberg [Mon, 18 Jan 2021 08:35:29 +0000 (09:35 +0100)] 
runtests: preprocess DISABLED to allow conditionals

... with this function provided, we can disable tests for specific
environments and setups directly within this file.

Closes #6477

4 years agoruntests: turn preprocessing into a separate function
Daniel Stenberg [Mon, 18 Jan 2021 08:16:41 +0000 (09:16 +0100)] 
runtests: turn preprocessing into a separate function

... and remove all other variable substitutions as they're now done once
and for all in the preprocessor.

4 years agolib/Makefile.inc: convert to listing each file on its own line
Daniel Stenberg [Thu, 14 Jan 2021 07:46:11 +0000 (08:46 +0100)] 
lib/Makefile.inc: convert to listing each file on its own line

... to make it diff friendlier and easier to read.

Closes #6448

4 years agoftplistparser: remove use of conn->data
Daniel Stenberg [Mon, 18 Jan 2021 21:59:25 +0000 (22:59 +0100)] 
ftplistparser: remove use of conn->data

Closes #6482

4 years agolib: more conn->data cleanups
Daniel Stenberg [Mon, 18 Jan 2021 10:56:50 +0000 (11:56 +0100)] 
lib: more conn->data cleanups

Closes #6479

4 years agovtls: reduce conn->data use
Patrick Monnerat [Wed, 13 Jan 2021 16:01:31 +0000 (17:01 +0100)] 
vtls: reduce conn->data use

Closes #6474

4 years agohyper: deliver data to application with Curl_client_write
Daniel Stenberg [Sun, 17 Jan 2021 22:49:15 +0000 (23:49 +0100)] 
hyper: deliver data to application with Curl_client_write

... just as the native code path does. Avoids sending too large data
chunks in the callback and more.

Reported-by: Gisle Vanem
Fixes #6462
Closes #6473

4 years agogopher: remove accidental conn->data leftover
Daniel Stenberg [Mon, 18 Jan 2021 21:57:56 +0000 (22:57 +0100)] 
gopher: remove accidental conn->data leftover

4 years agolibssh: avoid plain free() of libssh-memory
Daniel Stenberg [Mon, 18 Jan 2021 15:40:39 +0000 (16:40 +0100)] 
libssh: avoid plain free() of libssh-memory

Since curl's own memory debugging system redefines free() calls to track
and fiddle with memory, it cannot be used on memory allocated by 3rd
party libraries.

Third party libraries SHOULD NOT require free() to release allocated
resources for this reason - and libs can use separate healp allocators
on some systems (like Windows) so free() doesn't necessarily work
anyway.

Filed as an issue with libssh: https://bugs.libssh.org/T268

Closes #6481

4 years agosend: assert that Curl_write_plain() has a ->conn when called
Daniel Stenberg [Mon, 18 Jan 2021 07:55:13 +0000 (08:55 +0100)] 
send: assert that Curl_write_plain() has a ->conn when called

To help catch bad invokes.

Closes #6476

4 years agotest410: verify HTTPS GET with a 49K request header
Daniel Stenberg [Sat, 16 Jan 2021 22:22:04 +0000 (23:22 +0100)] 
test410: verify HTTPS GET with a 49K request header

skip test 410 for mesalink in the CI as it otherwise hangs "forever"

4 years agolib: pass in 'struct Curl_easy *' to most functions
Daniel Stenberg [Fri, 8 Jan 2021 16:58:15 +0000 (17:58 +0100)] 
lib: pass in 'struct Curl_easy *' to most functions

... in most cases instead of 'struct connectdata *' but in some cases in
addition to.

- We mostly operate on transfers and not connections.

- We need the transfer handle to log, store data and more. Everything in
  libcurl is driven by a transfer (the CURL * in the public API).

- This work clarifies and separates the transfers from the connections
  better.

- We should avoid "conn->data". Since individual connections can be used
  by many transfers when multiplexing, making sure that conn->data
  points to the current and correct transfer at all times is difficult
  and has been notoriously error-prone over the years. The goal is to
  ultimately remove the conn->data pointer for this reason.

Closes #6425

4 years agodocs: fix typos in NEW-PROTOCOL.md 6471/head
Emil Engler [Sun, 17 Jan 2021 11:54:34 +0000 (12:54 +0100)] 
docs: fix typos in NEW-PROTOCOL.md

This fixes a misspelled "it" and a grammatically wrong "-ing" suffix.

Closes #6471

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 16 Jan 2021 21:49:25 +0000 (22:49 +0100)] 
RELEASE-NOTES: synced

4 years agocmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
Razvan Cojocaru [Mon, 11 Jan 2021 11:00:36 +0000 (13:00 +0200)] 
cmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG

This does for cmake builds what --disable-openssl-auto-load-config
does for autoconf builds.

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

4 years agotest1918: verify curl_easy_option_by_name() and curl_easy_option_by_id()
Daniel Stenberg [Fri, 15 Jan 2021 12:04:20 +0000 (13:04 +0100)] 
test1918: verify curl_easy_option_by_name() and curl_easy_option_by_id()

... and as a practical side-effect, make sure that the
Curl_easyopts_check() function is asserted in debug builds, which we
want to detect mismatches between the options list in easyoptions.c and
the options in curl.h

Found-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64#commitcomment-45991815

Closes #6461

4 years agoeasyoptions: add the missing AWS_SIGV4
Gisle Vanem [Fri, 15 Jan 2021 12:12:51 +0000 (13:12 +0100)] 
easyoptions: add the missing AWS_SIGV4

Follow-up from AWS_SIGV4

4 years agoschannel_verify: fix safefree call typo
Daniel Stenberg [Fri, 15 Jan 2021 07:17:14 +0000 (08:17 +0100)] 
schannel_verify: fix safefree call typo

Follow-up from e87ad71d1ba00519

Closes #6459

4 years agomime: make sure setting MIMEPOST to NULL resets properly
Daniel Stenberg [Thu, 14 Jan 2021 15:31:42 +0000 (16:31 +0100)] 
mime: make sure setting MIMEPOST to NULL resets properly

... so that a function can first use MIMEPOST and then set it to NULL to
reset it back to a blank POST.

Added test 584 to verify the fix.

Reported-by: Christoph M. Becker
Fixes #6455
Closes #6456

4 years agomulti: set the PRETRANSFER time-stamp when we switch to PERFORM
Daniel Stenberg [Thu, 14 Jan 2021 13:24:07 +0000 (14:24 +0100)] 
multi: set the PRETRANSFER time-stamp when we switch to PERFORM

... instead of at end of the DO state. This makes the timer more
accurate for the protocols that use the DOING state (such as FTP), and
simplifies how the function (now called init_perform) is called.

The timer will then include the entire procedure up to PERFORM -
including all instructions for getting the transfer started.

Closes #6454

4 years agoCURLINFO_PRETRANSFER_TIME.3: clarify
Daniel Stenberg [Thu, 14 Jan 2021 13:22:25 +0000 (14:22 +0100)] 
CURLINFO_PRETRANSFER_TIME.3: clarify

... the timer *does* include the instructions for getting the remote
file.

Ref: #6452
Closes #6453

4 years agoschannel: plug a memory-leak
Gisle Vanem [Thu, 14 Jan 2021 16:09:37 +0000 (17:09 +0100)] 
schannel: plug a memory-leak

... when built without -DUNICODE.

Closes #6457

4 years agogitattributes: Set batch files to CRLF line endings on checkout
Jay Satiro [Wed, 13 Jan 2021 07:03:57 +0000 (02:03 -0500)] 
gitattributes: Set batch files to CRLF line endings on checkout

If a batch file is run without CRLF line endings (ie LF-only) then
arbitrary behavior may occur. I consider that a bug in Windows, however
the effects can be serious enough (eg unintended code executed) that
we're fixing it in the repo by requiring CRLF line endings for batch
files on checkout.

Prior to this change the checked-out line endings of batch files were
dependent on a user's git preferences. On Windows it is common for git
users to have automatic CRLF conversion enabled (core.autocrlf true),
but those users that don't would run into this behavior.

For example a user has reported running the Visual Studio project
generator batch file (projects/generate.bat) and it looped forever.
Output showed that the Windows OS interpreter was occasionally jumping
to arbitrary points in the batch file and executing commands. This
resulted in unintended files being removed (a removal sequence called)
and looping forever.

Ref: https://serverfault.com/q/429594
Ref: https://stackoverflow.com/q/232651
Ref: https://www.dostips.com/forum/viewtopic.php?t=8988
Ref: https://git-scm.com/docs/gitattributes#_checking_out_and_checking_in
Ref: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_autocrlf

Bug: https://github.com/curl/curl/discussions/6427
Reported-by: Ganesh Kamath
Closes https://github.com/curl/curl/pull/6442

4 years agotool_operate: spellfix a comment
Daniel Stenberg [Thu, 14 Jan 2021 12:40:12 +0000 (13:40 +0100)] 
tool_operate: spellfix a comment

4 years agoROADMAP: refreshed
Daniel Stenberg [Thu, 14 Jan 2021 08:48:42 +0000 (09:48 +0100)] 
ROADMAP: refreshed

o removed HSTS - already implemented
o added HTTPS RR records
o mention HTTP/3 completion

4 years agohttp_chunks: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 10:53:41 +0000 (11:53 +0100)] 
http_chunks: remove Curl_ prefix from static functions

4 years agotransfer: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 10:52:41 +0000 (11:52 +0100)] 
transfer: remove Curl_ prefix from static functions

4 years agotftp: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 10:51:50 +0000 (11:51 +0100)] 
tftp: remove Curl_ prefix from static functions

4 years agomulti: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 10:50:43 +0000 (11:50 +0100)] 
multi: remove Curl_ prefix from static functions

4 years agoldap: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 10:47:41 +0000 (11:47 +0100)] 
ldap: remove Curl_ prefix from static functions

4 years agodoh: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 10:46:14 +0000 (11:46 +0100)] 
doh: remove Curl_ prefix from static functions

4 years agoasyn-ares: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 10:43:35 +0000 (11:43 +0100)] 
asyn-ares: remove Curl_ prefix from static functions

4 years agovtls: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 08:26:13 +0000 (09:26 +0100)] 
vtls: remove Curl_ prefix from static functions

4 years agobearssl: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 07:53:40 +0000 (08:53 +0100)] 
bearssl: remove Curl_ prefix from static functions

4 years agombedtls: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 07:45:23 +0000 (08:45 +0100)] 
mbedtls: remove Curl_ prefix from static functions

4 years agowolfssl: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 07:42:36 +0000 (08:42 +0100)] 
wolfssl: remove Curl_ prefix from static functions

4 years agonss: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 07:36:10 +0000 (08:36 +0100)] 
nss: remove Curl_ prefix from static functions

4 years agognutls: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 07:28:10 +0000 (08:28 +0100)] 
gnutls: remove Curl_ prefix from static functions

4 years agoopenssl: remove Curl_ prefix from static functions
Daniel Stenberg [Wed, 13 Jan 2021 07:18:22 +0000 (08:18 +0100)] 
openssl: remove Curl_ prefix from static functions

... as we reserve this prefix to library-wide functions.

Closes #6443

4 years agonss: get the run-time version instead of build-time
Daniel Stenberg [Wed, 13 Jan 2021 15:01:57 +0000 (16:01 +0100)] 
nss: get the run-time version instead of build-time

Closes #6445

4 years agotool_doswin: Restore original console settings on CTRL signal
Jay Satiro [Thu, 19 Nov 2020 21:49:24 +0000 (16:49 -0500)] 
tool_doswin: Restore original console settings on CTRL signal

- Move Windows terminal init code from tool_main to tool_doswin.

- Restore the original console settings on CTRL+C and CTRL+BREAK.

Background: On Windows the curl tool changes the console settings to
enable virtual terminal processing (eg color output) if supported
(ie Win 10). The original settings are restored on exit but prior to
this change were not restored in the case of the CTRL signals.

Windows VT behavior varies depending on console/powershell/terminal;
refer to the discussion in #6226.

Assisted-by: Rich Turner
Closes https://github.com/curl/curl/pull/6226

4 years agogen.pl: fix perl syntax
Daniel Stenberg [Tue, 12 Jan 2021 07:12:13 +0000 (08:12 +0100)] 
gen.pl: fix perl syntax

Follow-up to 324cf1d2e

4 years agohelp: update to current codebase
Emil Engler [Tue, 12 Jan 2021 06:34:52 +0000 (07:34 +0100)] 
help: update to current codebase

This commit bumps the help to the current state of the project.

Closes #6437

4 years agodocs: fix line length bug in gen.pl
Emil Engler [Mon, 11 Jan 2021 19:27:58 +0000 (20:27 +0100)] 
docs: fix line length bug in gen.pl

The script warns if the length of $opt and $desc is > 78. However, these
two variables are on totally separate lines so the check makes no sense.
Also the $bitmask field is totally forgotten. Currently this leads to
two warnings within `--resolve` and `--aws-sigv4`.

Closes #6438

4 years agodocs: fix wrong documentation in help.d
Emil Engler [Mon, 11 Jan 2021 19:12:48 +0000 (20:12 +0100)] 
docs: fix wrong documentation in help.d

curl does not list all categories when you invoke "--help" without any
parameters.

Closes #6436

4 years agoaws-sigv4.d: polish the wording
Daniel Stenberg [Mon, 11 Jan 2021 21:37:41 +0000 (22:37 +0100)] 
aws-sigv4.d: polish the wording

Make it shorter and imperative form

Closes #6439

4 years agomisc: fix typos
Fabian Keil [Thu, 7 Jan 2021 20:11:17 +0000 (21:11 +0100)] 
misc: fix typos

Bug: https://curl.se/mail/lib-2021-01/0063.html
Closes #6434

4 years agomulti_runsingle: bail out early on data->conn == NULL
Daniel Stenberg [Mon, 11 Jan 2021 08:37:44 +0000 (09:37 +0100)] 
multi_runsingle: bail out early on data->conn == NULL

As that's a significant error condition and scan-build warns for NULL
pointer dereferences if we don't.

Closes #6433

4 years agomulti: skip DONE state if there's no connection left for ftp wildcard
Daniel Stenberg [Mon, 11 Jan 2021 09:01:49 +0000 (10:01 +0100)] 
multi: skip DONE state if there's no connection left for ftp wildcard

... to avoid running in that state with data->conn being NULL.

4 years agolibssh2: fix "Value stored to 'readdir_len' is never read"
Daniel Stenberg [Mon, 11 Jan 2021 08:18:30 +0000 (09:18 +0100)] 
libssh2: fix "Value stored to 'readdir_len' is never read"

Detected by scan-build

4 years agoconnect: mark intentional ignores of setsockopt return values
Daniel Stenberg [Sun, 10 Jan 2021 23:13:01 +0000 (00:13 +0100)] 
connect: mark intentional ignores of setsockopt return values

Pointed out by Coverity

Closes #6431

4 years agohttp_proxy: Fix CONNECT chunked encoding race condition
Jay Satiro [Mon, 11 Jan 2021 00:01:08 +0000 (19:01 -0500)] 
http_proxy: Fix CONNECT chunked encoding race condition

- During the end-of-headers response phase do not mark the tunnel
  complete unless the response body was completely parsed/ignored.

Prior to this change if the entirety of a CONNECT response with chunked
encoding was not received by the time the final header was parsed then
the connection would be marked done prematurely, before all the chunked
data could be read in and ignored (since this is what we do with any
CONNECT response body) and the connection could not be used.

Bug: https://curl.se/mail/lib-2021-01/0033.html
Reported-by: Fabian Keil
Closes https://github.com/curl/curl/pull/6432

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 10 Jan 2021 23:27:46 +0000 (00:27 +0100)] 
RELEASE-NOTES: synced

4 years agourl: if IDNA conversion fails, fallback to Transitional
Daniel Stenberg [Sun, 10 Jan 2021 14:35:48 +0000 (15:35 +0100)] 
url: if IDNA conversion fails, fallback to Transitional

This improves IDNA2003 compatiblity.

Reported-by: Bubu on github
Fixes #6423
Closes #6428

4 years agotravis: make the Hyper build from its master branch
Daniel Stenberg [Sun, 10 Jan 2021 21:59:19 +0000 (22:59 +0100)] 
travis: make the Hyper build from its master branch

Closes #6430

4 years agohttp: make 'authneg' also work for Hyper
Daniel Stenberg [Fri, 8 Jan 2021 15:17:12 +0000 (16:17 +0100)] 
http: make 'authneg' also work for Hyper

When doing a request with a request body expecting a 401/407 back, that
initial request is sent with a zero content-length. Test 177 and more.

Closes #6424

4 years agocmake: Add an option to disable libidn2
Jay Satiro [Tue, 22 Dec 2020 20:31:03 +0000 (15:31 -0500)] 
cmake: Add an option to disable libidn2

New option USE_LIBIDN2 defaults to ON for libidn2 detection. Prior to
this change libidn2 detection could not be turned off in cmake builds.

Reported-by: William A Rowe Jr
Fixes https://github.com/curl/curl/issues/6361
Closes https://github.com/curl/curl/pull/6362

4 years agoHYPER: no longer needs the special branch
Daniel Stenberg [Fri, 8 Jan 2021 22:54:22 +0000 (23:54 +0100)] 
HYPER: no longer needs the special branch

4 years agotest179: use consistent header line endings
Daniel Stenberg [Fri, 8 Jan 2021 09:57:48 +0000 (10:57 +0100)] 
test179: use consistent header line endings

... to make "Hyper mode" work better.

4 years agofile: don't provide content-length for directories
Daniel Stenberg [Thu, 7 Jan 2021 15:00:41 +0000 (16:00 +0100)] 
file: don't provide content-length for directories

... as it is misleading.

Ref #6379
Closes #6421

4 years agoTODO: Directory listing for FILE:
Daniel Stenberg [Thu, 7 Jan 2021 15:16:13 +0000 (16:16 +0100)] 
TODO: Directory listing for FILE:

Ref #6379

4 years agocurl.h: add CURLPROTO_GOPHERS as own protocol identifier
Daniel Stenberg [Tue, 5 Jan 2021 16:22:09 +0000 (17:22 +0100)] 
curl.h: add CURLPROTO_GOPHERS as own protocol identifier

Follow-up to a1f06f32b860, to make sure it can be handled separately
from plain gopher.

Closes #6418

4 years agohttp: have CURLOPT_FAILONERROR fail after all headers
Daniel Stenberg [Mon, 4 Jan 2021 17:28:42 +0000 (18:28 +0100)] 
http: have CURLOPT_FAILONERROR fail after all headers

... so that Retry-After and other meta-content can still be used.

Added 1634 to verify. Adjusted test 194 and 281 since --fail now also
includes the header-terminating CRLF in the output before it exits.

Fixes #6408
Closes #6409

4 years agoglobal_init: debug builds allocates a byte in init
Daniel Stenberg [Mon, 4 Jan 2021 23:03:57 +0000 (00:03 +0100)] 
global_init: debug builds allocates a byte in init

... to make build tools/valgrind warn if no curl_global_cleanup is
called.

This is conditionally only done for debug builds with the env variable
CURL_GLOBAL_INIT set.

Closes #6410

4 years agolib/unit tests: add missing curl_global_cleanup() calls
Daniel Stenberg [Mon, 4 Jan 2021 23:03:31 +0000 (00:03 +0100)] 
lib/unit tests: add missing curl_global_cleanup() calls

4 years agotravis: adapt to Hyper build change
Daniel Stenberg [Tue, 5 Jan 2021 23:50:49 +0000 (00:50 +0100)] 
travis: adapt to Hyper build change

Closes #6419

4 years agopretransfer: setup the User-Agent header here
Daniel Stenberg [Tue, 5 Jan 2021 13:30:21 +0000 (14:30 +0100)] 
pretransfer: setup the User-Agent header here

... and not in the connection setup, as for multiplexed transfers the
connection setup might be skipped and then the transfer would end up
without the set user-agent!

Reported-by: Flameborn on github
Assisted-by: Andrey Gursky
Assisted-by: Jay Satiro
Assisted-by: Mike Gelfand
Fixes #6312
Closes #6417

4 years agotest66: disable with Hyper
Daniel Stenberg [Tue, 5 Jan 2021 16:27:05 +0000 (17:27 +0100)] 
test66: disable with Hyper

...as Hyper doesn't support HTTP/0.9

4 years agoc-hyper: poll the tasks until end correctly
Daniel Stenberg [Tue, 5 Jan 2021 10:47:22 +0000 (11:47 +0100)] 
c-hyper: poll the tasks until end correctly

... makes test 36 work.

Closes #6412

4 years agomk-ca-bundle.pl: deterministic output when using -t
Gergely Nagy [Tue, 5 Jan 2021 11:49:55 +0000 (12:49 +0100)] 
mk-ca-bundle.pl: deterministic output when using -t

Printing trust purposes are now sorted, making the output deterministic
when running on the same input certdata.txt.

Closes #6413

4 years agoKNOWN_BUGS: fixed "wolfSSL lacks support for renegotiation"
Daniel Stenberg [Tue, 5 Jan 2021 09:08:06 +0000 (10:08 +0100)] 
KNOWN_BUGS: fixed "wolfSSL lacks support for renegotiation"

Fixed by #6411

4 years agowolfssl: add SECURE_RENEGOTIATION support
Himanshu Gupta [Mon, 31 Aug 2020 19:35:35 +0000 (19:35 +0000)] 
wolfssl: add SECURE_RENEGOTIATION support

Closes #6411

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 5 Jan 2021 08:44:58 +0000 (09:44 +0100)] 
RELEASE-NOTES: synced

4 years agowolfssl: update copyright year range
Daniel Stenberg [Tue, 5 Jan 2021 08:39:59 +0000 (09:39 +0100)] 
wolfssl: update copyright year range

Follow-up to 7de2e96535e9

4 years agoc-hyper: make CURLE_GOT_NOTHING work
Daniel Stenberg [Mon, 4 Jan 2021 15:55:30 +0000 (16:55 +0100)] 
c-hyper: make CURLE_GOT_NOTHING work

Test 30

Closes #6407

4 years agohttp_proxy: make CONNECT work with the Hyper backend
Daniel Stenberg [Mon, 4 Jan 2021 08:36:41 +0000 (09:36 +0100)] 
http_proxy: make CONNECT work with the Hyper backend

Makes test 80 run

Closes #6406

4 years agoTODO: --fail-with-body perchance?
Daniel Stenberg [Tue, 5 Jan 2021 08:36:10 +0000 (09:36 +0100)] 
TODO: --fail-with-body perchance?

4 years agotool_operate: fix the suppression logic of some error messages
Jay Satiro [Sat, 2 Jan 2021 08:40:24 +0000 (03:40 -0500)] 
tool_operate: fix the suppression logic of some error messages

- Fix the failed truncation and failed writing body error messages to
  not be shown unless error messages are shown. (ie the user has
  specified -sS, or has not specified -s).

- Also prefix same error messages with "curl: ", for example:
  curl: (23) Failed to truncate, exiting

Prior to this change the failed truncation error messages would be shown
if not -s, but did not account for -sS which should show.

Prior to this change the failed writing body error messages would be
shown always.

Ref: https://curl.se/docs/manpage.html#-S

Bug: https://curl.se/mail/archive-2020-12/0017.html
Reported-by: Hongyi Zhao
Closes https://github.com/curl/curl/pull/6402

4 years agowolfssl: Support wolfSSL builds missing TLS 1.1
Jay Satiro [Tue, 29 Dec 2020 20:46:42 +0000 (15:46 -0500)] 
wolfssl: Support wolfSSL builds missing TLS 1.1

The wolfSSL TLS library defines NO_OLD_TLS in some of their build
configurations and that causes the library to be built without TLS 1.1.
For example if MD5 is explicitly disabled when building wolfSSL then
that defines NO_OLD_TLS and the library is built without TLS 1.1 [1].

Prior to this change attempting to build curl with a wolfSSL that was
built with NO_OLD_TLS would cause a build link error undefined reference
to wolfTLSv1_client_method.

[1]: https://github.com/wolfSSL/wolfssl/blob/v4.5.0-stable/configure.ac#L2366

Bug: https://curl.se/mail/lib-2020-12/0121.html
Reported-by: Julian Montes
Closes https://github.com/curl/curl/pull/6388

4 years agotest1633: set appropriate name
Daniel Stenberg [Mon, 4 Jan 2021 16:58:05 +0000 (17:58 +0100)] 
test1633: set appropriate name

"--retry with a 429 response and Retry-After:"

4 years agotravis: limit the tests with quiche builds to HTTPS and FTPS only
Daniel Stenberg [Sat, 2 Jan 2021 10:44:58 +0000 (11:44 +0100)] 
travis: limit the tests with quiche builds to HTTPS and FTPS only

... since it runs into the 50 minute time limit too often otherwise.

Closes #6403

4 years agoHISTORY: added dates to early history
Daniel Stenberg [Sun, 3 Jan 2021 15:27:51 +0000 (16:27 +0100)] 
HISTORY: added dates to early history

Mostly thanks to this archived web page for urlget:

https://web.archive.org/web/19980216125115/http://www.inf.ufrgs.br/~sagula/urlget.html

4 years agohttpauth: make multi-request auth work with custom port
Daniel Stenberg [Fri, 1 Jan 2021 22:41:21 +0000 (23:41 +0100)] 
httpauth: make multi-request auth work with custom port

When doing HTTP authentication and a port number set with CURLOPT_PORT,
the code would previously have the URL's port number override as if it
had been a redirect to an absolute URL.

Added test 1568 to verify.

Reported-by: UrsusArctos on github
Fixes #6397
Closes #6400

4 years agolanguage: s/behaviour/behavior/g
Emil Engler [Thu, 31 Dec 2020 09:11:49 +0000 (10:11 +0100)] 
language: s/behaviour/behavior/g

We currently use both spellings the british "behaviour" and the american
"behavior". However "behavior" is more used in the project so I think
it's worth dropping the british name.

Closes #6395

4 years agocmdline-opts/retry.d: mention response code 429 as well
Daniel Stenberg [Sat, 2 Jan 2021 10:51:55 +0000 (11:51 +0100)] 
cmdline-opts/retry.d: mention response code 429 as well

Reported-by: Cherish98
Bug: https://curl.se/mail/archive-2020-12/0018.html

4 years agodocs/HYPER.md: mention outstanding issues
Daniel Stenberg [Sat, 2 Jan 2021 10:42:27 +0000 (11:42 +0100)] 
docs/HYPER.md: mention outstanding issues

To make it more obvious to users what doesn't work (yet)

Closes #6389

4 years agoCOPYING/configure: bump copyright year range
Daniel Stenberg [Thu, 31 Dec 2020 23:52:28 +0000 (00:52 +0100)] 
COPYING/configure: bump copyright year range

4 years agoc-hyper: add timecondition to the request
Daniel Stenberg [Thu, 31 Dec 2020 23:48:40 +0000 (00:48 +0100)] 
c-hyper: add timecondition to the request

Test 77-78

Closes #6391

4 years agoc-hyper: make Digest and NTLM work
Daniel Stenberg [Wed, 30 Dec 2020 10:58:39 +0000 (11:58 +0100)] 
c-hyper: make Digest and NTLM work

Test 64, 65, 67, 68, 69, 70, 72

Closes #6390

4 years agoexamples/curlgtk.c: fix the copyright year range
Daniel Stenberg [Wed, 30 Dec 2020 21:37:44 +0000 (22:37 +0100)] 
examples/curlgtk.c: fix the copyright year range

... and make private functions static.

4 years agodocs/examples: adjust prototypes for CURLOPT_READFUNCTION
Olaf Hering [Wed, 30 Dec 2020 16:01:47 +0000 (17:01 +0100)] 
docs/examples: adjust prototypes for CURLOPT_READFUNCTION

The type of the buffer in curl_read_callback is 'char *', not 'void *'.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Closes #6392

4 years agoexamples: fix more empty expression statement has no effect
Daniel Stenberg [Wed, 30 Dec 2020 21:18:45 +0000 (22:18 +0100)] 
examples: fix more empty expression statement has no effect

Follow-up to 26e46617b9

4 years agocleanup: fix two empty expression statement has no effect
Daniel Stenberg [Wed, 30 Dec 2020 15:54:28 +0000 (16:54 +0100)] 
cleanup: fix two empty expression statement has no effect

Follow-up to 26e46617b9

4 years agoconfigure: set -Wextra-semi-stmt for clang with --enable-debug
Daniel Stenberg [Sat, 26 Dec 2020 15:41:09 +0000 (16:41 +0100)] 
configure: set -Wextra-semi-stmt for clang with --enable-debug

To have it properly complain on empty statements with no effect.

Ref: #6376
Closes #6378