Commit Graph

27516 Commits

Author SHA1 Message Date
Michael Kaufmann
dd37639df7 progress: fix a compile warning on some systems
lib/progress.c:380:40: warning: conversion to 'long double' from
'curl_off_t {aka long long int}' may alter its value [-Wconversion]

Closes #7549
2021-08-10 22:39:16 +02:00
Daniel Stenberg
7dbda156e6
RELEASE-NOTES: synced 2021-08-10 11:47:44 +02:00
Daniel Stenberg
c495dcd02e
http: consider cookies over localhost to be secure
Updated test31.
Added test 392 to verify secure cookies used for http://localhost

Reviewed-by: Daniel Gustafsson
Fixes #6733
Closes #7263
2021-08-10 11:20:21 +02:00
Daniel Stenberg
cfe36679d9
TODO: erase secrets from heap/stack after use
Closes #7268
2021-08-10 10:26:16 +02:00
Jay Satiro
16e9c8e990 hostip: Make Curl_ipv6works function independent of getaddrinfo
- Do not assume IPv6 is not working when getaddrinfo is not present.

The check to see if IPv6 actually works is now independent of whether
there is any resolver that can potentially resolve a hostname to IPv6.

Prior to this change if getaddrinfo() was not found at compile time then
Curl_ipv6works() would be defined as a macro that returns FALSE.

When getaddrinfo is not found then libcurl is built with CURLRES_IPV4
defined instead of CURLRES_IPV6, meaning that it cannot do IPv6 lookups
in the traditional way. With this commit if libcurl is built with IPv6
support (ENABLE_IPV6) but without getaddrinfo (CURLRES_IPV6), and the
IPv6 stack is actually working, then it is possible for libcurl to
resolve IPv6 addresses by using DoH.

Ref: https://github.com/curl/curl/issues/7483#issuecomment-890765378

Closes https://github.com/curl/curl/pull/7529
2021-08-10 03:29:49 -04:00
Jay Satiro
26f93cf038 test1565: fix windows build errors
- Use our wait_ms() instead of sleep() since Windows doesn't have the
  latter.

- Use a separate variable to keep track of whether the pthread_t thread
  id is valid.

On Windows pthread_t is not an integer type. pthread offers no macro for
invalid pthread_t thread id, so validity is kept track of separately.

Closes https://github.com/curl/curl/pull/7527
2021-08-10 03:29:40 -04:00
Jeremy Falcon
86c9146209 winbuild/README.md: clarify GEN_PDB option
- Document that GEN_PDB option creates an external database.

Ref: https://github.com/curl/curl/issues/7502
2021-08-09 13:02:52 -04:00
Tatsuhiro Tsujikawa
dff44c2955
ngtcp2: replace deprecated functions with nghttp3_conn_shutdown_stream_read
Closes #7546
2021-08-09 16:53:32 +02:00
Tatsuhiro Tsujikawa
636006dd36
ngtcp2: rework the return value handling of ngtcp2_conn_writev_stream
Rework the return value handling of ngtcp2_conn_writev_stream and treat
NGTCP2_ERR_STREAM_SHUT_WR separately.

Closes #7546
2021-08-09 16:53:11 +02:00
Daniel Stenberg
c4242b1e6e
configure: error out if both ngtcp2 and quiche are specified
Reported-by: Vincent Grande
See #7539
Closes #7545
2021-08-09 14:14:38 +02:00
Jeff Mears
76e047fc27
easy: use a custom implementation of wcsdup on Windows
... so that malloc/free overrides from curl_global_init are used for
wcsdup correctly.

Closes #7540
2021-08-09 14:08:42 +02:00
Daniel Stenberg
3e2a229783
zuul: add an mbedtls3 CI job
Closes #7544
2021-08-09 10:26:11 +02:00
Benau
3f126138be
mbedTLS: initial 3.0.0 support
Closes #7428
2021-08-09 10:25:17 +02:00
Daniel Stenberg
b836b065bd
RELEASE-NOTES: synced 2021-08-08 23:57:28 +02:00
Daniel Stenberg
26c002bf7c
configure.ac: revert bad nghttp2 library detection improvements
This reverts commit b4b34db65f, 673753344c and 29c7cf79e8.

The logic is now back to assuming that the nghttp2 lib is called nghttp2 and
nothing else.

Reported-by: Rui Pinheiro
Reported-by: Alex Crichton
Fixes #7514
Closes #7515
2021-08-08 22:57:29 +02:00
Daniel Stenberg
a2e29f0731
happy-eyeballs-timeout-ms.d: polish the wording
Reported-by: Josh Soref
Fixes #7433
Closes #7542
2021-08-08 22:41:32 +02:00
modbw
65c1b8ee17
mbedtls_threadlock: fix unused variable warning
Closes #7393
2021-08-08 18:37:56 +02:00
Tatsuhiro Tsujikawa
e3dbdd5468
ngtcp2: compile with the latest ngtcp2 and nghttp3
Closes #7541
2021-08-08 18:02:27 +02:00
Marc Hoersken
1390fc0977
CI/cirrus: reduce compile time with increased parallism
Cirrus CI VMs have 2 CPUs, let's use them also for Windows builds.

Reviewed-by: Daniel Stenberg
Closes #7505
2021-07-31 12:20:33 +02:00
Bin Lan
5b9fedb461
tool/tests: fix potential year 2038 issues
The length of 'long' in a 32-bit system is 32 bits, which cannot be used
to save timestamps after 2038. Most operating systems have extended
time_t to 64 bits.

Remove the castings to long.

Closes #7466
2021-07-30 16:06:37 +02:00
Daniel Stenberg
94bd01310b
compressed.d: it's a request, not an order
Clarified

Reported-by: Dan Jacobson
Reviewed-by: Daniel Gustafsson
Fixes #7516
Closes #7517
2021-07-30 12:59:33 +02:00
Bernhard M. Wiedemann
8d0c1137c1
tests: make three tests pass until 2037
after 2038 something in test1915 fails on 32-bit OSes

Closes #7512
2021-07-30 12:39:34 +02:00
Daniel Gustafsson
3df8d08d00 connect: remove superfluous conditional
Commit dbd16c3e2 cleaned up the logic for traversing the addrinfos,
but the move left a conditional on ai which no longer is needed as
the while loop reevaluation will cover it.

Closes #7511
Reviewed-by: Carlo Marcelo Arenas Belón
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-07-30 09:40:15 +02:00
Daniel Stenberg
fbf26594e3
RELEASE-NOTES: synced
and bump curlver to 7.79.0 for next release
2021-07-29 17:46:32 +02:00
Marc Hoersken
c34bd93f60
tests/*server.py: remove pidfile on server termination
Avoid pidfile leaking/laying around after server already exited.

Reviewed-by: Daniel Stenberg
Closes #7506
2021-07-29 08:08:07 +02:00
Daniel Gustafsson
4d680e4a8f tool_main: fix typo in comment
The referred to library is NSPR, so fix the switched around characters.
2021-07-27 22:38:45 +02:00
Aleksandr Krotov
beb1b1cb03
bearssl: support CURLOPT_CAINFO_BLOB
Closes #7468
2021-07-28 23:04:53 +02:00
Daniel Stenberg
9f488fac18
curl.1: mention "global" flags
Mention options that are "global". A global command line option is one
that doesn't get reset at --next uses and therefore don't need to be
used again.

Reported-by: Josh Soref

Fixes #7457
Closes #7510
2021-07-28 22:53:20 +02:00
Daniel Stenberg
21e090369e
CURLOPT_DOH_URL.3: CURLOPT_OPENSOCKETFUNCTION is not inherited
Reported-by: Daniel Woelfel
Fixes #7441
Closes #7509
2021-07-28 17:34:22 +02:00
Daniel Stenberg
ceedf7faf4
KNOWN_BUGS: add more HTTP/3 problems
Closes #7351
Closes #7339
Closes #7125
2021-07-28 17:22:27 +02:00
Marc Hoersken
3970e68dae
CI/azure: reduce compile time with increased parallism
Azure Pipelines CI VMs have 2 CPUs, let's use them.

Closes #7489
2021-07-27 20:42:29 +02:00
Josh Soref
4d145346ae docs: fix grammar
Fixes https://github.com/curl/curl/issues/7444
Fixes https://github.com/curl/curl/issues/7451
Fixes https://github.com/curl/curl/issues/7465
Closes https://github.com/curl/curl/pull/7495
2021-07-27 13:44:30 -04:00
Jay Satiro
2a4bf88699 mail-rcpt.d: fix grammar
Remove confusing sentence that says to specify an e-mail address for
mail transfer, since that's implied.

Reported-by: Josh Soref

Fixes https://github.com/curl/curl/issues/7452
Closes https://github.com/curl/curl/pull/7495
2021-07-27 13:43:44 -04:00
Daniel Stenberg
2c688a4aae
c-hyper: remove the hyper_executor_poll() loop from Curl_http
1. it's superfluous
2. it didn't work identically to the Curl_hyper_stream one which could
   cause problems like #7486

Pointed-out-by: David Cook
Closes #7499
2021-07-27 10:42:47 +02:00
Daniel Stenberg
1e5e93d899
curl-openssl.m4: check lib64 for the pkg-config file
OpenSSL recently started putting the libs in $prefix/lib64 on 'make
install', so we check that directory for pkg-config data if the 'lib'
check fails.

Closes #7503
2021-07-26 23:46:30 +02:00
Daniel Stenberg
76bed59ec3
CURLOPT_SSL_CTX_*.3: tidy up the example
Use the proper code style. Don't store return codes that aren't read.
Copy the same example into CURLOPT_SSL_CTX_FUNCTION.3 as well.

Closes #7500
2021-07-26 22:11:17 +02:00
Daniel Stenberg
17c7a56d14
example/cookie_interface: fix scan-build printf warning
Follow-up to 4b79c4fb56

Fixes #7497
Closes #7498
2021-07-26 18:20:03 +02:00
Josh Soref
b045a7d77c
limit-rate.d: clarify base unit
Fixes #7439
Closes #7494
2021-07-26 16:03:27 +02:00
Carlo Marcelo Arenas Belón
4b79c4fb56
examples/cookie_interface: avoid printfing time_t directly
time_t representation is undefined and varies on bitsize and signedness,
and as of C11 could be even non integer.

instead of casting to unsigned long (which would truncate in systems
with a 32bit long after 2106) use difftime to get the elapsed time as a
double and print that (without decimals) instead.

alternatively a cast to curl_off_t and its corresponding print
formatting could have been used (at least in POSIX) but portability and
curl agnostic code was prioritized.

Closes #7490
2021-07-26 00:55:17 +02:00
Marc Hoersken
4a7bf79fcc
tests/servers: remove obsolete pid variable
Variable is not used since pidfile handling moved to util.[ch]

Reviewed-by: Jay Satiro
Closes #7482
2021-07-25 20:00:18 +02:00
Marc Hoersken
d9d26a6b2c
tests/servers: use our platform-aware pid for server verification
The pid used for server verification is later stored as pid2 in
the hash of running test servers and therefore used for shutdown.

The pid used for shutdown must be the platform-aware (Win32) pid
to avoid leaking test servers while running them using Cygwin/msys.

Reviewed-by: Jay Satiro
Closes #7481
2021-07-25 19:59:58 +02:00
Marc Hoersken
893f39c596
tests/runtests.pl: cleanup copy&paste mistakes and unused code
Reviewed-by: Jay Satiro
Part of #7481
2021-07-25 19:59:14 +02:00
Daniel Stenberg
3a280a19cc
RELEASE-NOTES: synced
bumped to 7.78.1 for next release
2021-07-25 13:33:03 +02:00
Daniel Stenberg
c27a70a591
http_proxy: clear 'sending' when the outgoing request is sent
... so that Curl_connect_getsock() will know how to wait for the socket
to become readable and not writable after the entire CONNECT request has
been issued.

Regression added in 7.77.0

Reported-by: zloi-user on github
Assisted-by: Jay Satiro
Fixes #7155
Closes #7484
2021-07-25 13:24:38 +02:00
Josh Soref
e8cd39345e openssl: fix grammar
Closes https://github.com/curl/curl/pull/7480
2021-07-25 01:42:39 -04:00
Jay Satiro
b4b34db65f configure.ac: tweak nghttp2 library name fix again
- Change extraction to handle multiple library names returned by
  pkg-config (eg a possible scenario with pkg-config --static).

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

Closes https://github.com/curl/curl/pull/7485
2021-07-25 01:29:38 -04:00
Dan Fandrich
83245d9ff3 Get rid of the unused HAVE_SIG_ATOMIC_T et. al.
It was added in 2006 but I see no evidence it was ever used.
2021-07-23 12:40:42 -07:00
Jay Satiro
9a6f974881 docs: change max-filesize caveat again
- Add protocols field to max-filesize.d.

- Revert wording on unknown file size caveat and do not discuss specific
  protocols in that section.

Partial revert of ecf0225. All max-filesize options now have the list of
protocols and it's clearer just to have that list without discussing
specific protocols in the caveat.

Reported-by: Josh Soref

Ref: https://github.com/curl/curl/issues/7453#issuecomment-884128762
2021-07-23 02:56:52 -04:00
Christian Weisgerber
673753344c
configure: tweak nghttp2 library name fix
commit 29c7cf79e8 (shipped in 7.78.0) introduced a problem by
assuming that LIB_H2 does not have any leading whitespace.  At least
OpenBSD's native pkg-config can produce such whitespace, though:

    $ pkg-config --libs-only-l libnghttp2
     -lnghttp2

As a result, the configure check for libnghttp2 will erroneously fail.

Bug: https://curl.se/mail/lib-2021-07/0050.html
Closes #7472
2021-07-22 17:14:40 +02:00
Bastian Krause
59878411c4
docs/MQTT: update state of username/password support
PR #7243 implemented username/password support for MQTT, so let's drop
these items from the caveats.

Signed-off-by: Bastian Krause <bst@pengutronix.de>

Closes #7474
2021-07-22 00:06:15 +02:00