Commit Graph

30042 Commits

Author SHA1 Message Date
Daniel Stenberg
47ccaa4218
RELEASE-NOTES: synced
The curl 8.0.0 release
2023-03-20 08:04:43 +01:00
Daniel Stenberg
370dcf0b96
THANKS: from the 8.0.0 release 2023-03-20 08:04:43 +01:00
Daniel Stenberg
a51f90ec0f
scripts/delta: fix "ambiguous argument" when used in branches 2023-03-18 10:22:58 +01:00
Daniel Stenberg
bb334dfdde
SECURITY-PROCESS.md: Busy-loops are not security problems
Closes #10790
2023-03-18 09:59:23 +01:00
Stefan Eissing
b00289843a
tests/http: do not save files for downloads in scorecard testing
Closes #10788
2023-03-17 23:01:04 +01:00
Daniel Stenberg
138860576f
cf-socket: use port 80 when resolving name for local bind
It turns out c-ares returns an error when asked to resolve a host name with
ares_getaddrinfo using port number 0.

Reported as a c-ares bug here: https://github.com/c-ares/c-ares/issues/517

The work-around is to simply use port 80 instead, as the number typically does
not make a difference and a non-zero number works for c-ares.

Fixes #10759
Reported-by: Matt Jolly
Closes #10789
2023-03-17 22:55:31 +01:00
Daniel Stenberg
c3f3c2557c
curl.h: require gcc 12.1 for the deprecation magic
Reported-by: kchow-FTNT on github
Fixes #10726
Closes #10784
2023-03-17 17:52:48 +01:00
Daniel Stenberg
f5e0f52dd3
Revert "rtsp: use dynbuf instead of custom reallocs"
This reverts commit 1b9ea3239d because of OSS-fuzz reports.
I'll do another take after the pending release.

Closes #10785
2023-03-17 15:41:07 +01:00
Daniel Stenberg
ba1fba9cad
test422: verify --next used without a prior URL
Closes #10782
2023-03-17 14:07:20 +01:00
Daniel Stenberg
e2452cf60e
tool_getparam: error if --next is used without a prior URL
Reported-by: 積丹尼 Dan Jacobson
Ref: https://github.com/curl/curl/pull/10769#discussion_r1137895629

Closes #10782
2023-03-17 14:07:10 +01:00
Daniel Stenberg
f7a3fae4cb
libssh: use dynbuf instead of realloc
When building lines to show for SFTP directory listings.

Closes #10778
2023-03-16 23:32:22 +01:00
Daniel Stenberg
f24014c3eb
lib2305: deal with CURLE_AGAIN
The test does a slightly ugly busy-loop for this case but should be
managable due to it likely being a very short moment.

Mention CURLE_AGAIN in curl_ws_recv.3

Fixes #10760
Reported-by: Jay Satiro
Closes #10781
2023-03-16 23:29:12 +01:00
Daniel Stenberg
1b9ea3239d
rtsp: use dynbuf instead of custom reallocs
For the RTP buffering.

Closes #10776
2023-03-16 16:09:55 +01:00
Daniel Stenberg
d2d0e60012
libssh2: remove unused variable from libssh2's struct
Closes #10777
2023-03-16 13:44:48 +01:00
Daniel Stenberg
751f5e269f
RELEASE-NOTES: synced 2023-03-16 08:39:48 +01:00
Daniel Stenberg
f6d6f3ce01
multi: remove PENDING + MSGSENT handles from the main linked list
As they are not driving transfers or any socket activity, the main loop
does not need to iterate over these handles. A performance improvement.

They are instead only held in their own separate lists.

Assisted-by: Stefan Eissing
Ref: #10743
Closes #10762
2023-03-15 10:37:49 +01:00
Daniel Stenberg
a208be3710
multi: turn link/unlinking easy handles into dedicated functions 2023-03-15 10:37:48 +01:00
Daniel Stenberg
18a45a51ba
http_aws_sigv4: fix scan-build "value stored to 'ret' is never read"
Follow-up to 495d09810a

Closes #10766
2023-03-15 07:32:01 +01:00
Daniel Stenberg
e5e8815532
lib: skip Curl_llist_destroy calls
Linked lists themselves do not carry any allocations, so for the lists
that do not have have a set destructor we can just skip the
Curl_llist_destroy() call and save CPU time.

Closes #10764
2023-03-15 00:10:21 +01:00
Daniel Stenberg
5ec15ea48f
lib643: LIB644 is never defined, this is dead code
Closes #10765
2023-03-15 00:08:09 +01:00
Daniel Stenberg
7ce1a6ae75
libtest/Makefile.inc: remove superfluous variables
Rely on the defaults when possible.

Closes #10765
2023-03-15 00:08:01 +01:00
Daniel Stenberg
c46761bd8b
tests/http: remove year ranges from copyrights
Closes #10763
2023-03-15 00:05:29 +01:00
Casey Bodley
495d09810a
aws_sigv4: fall back to UNSIGNED-PAYLOAD for sign_as_s3
all s3 requests default to UNSIGNED-PAYLOAD and add the required
x-amz-content-sha256 header. this allows CURLAUTH_AWS_SIGV4 to correctly
sign s3 requests to amazon with no additional configuration

Signed-off-by: Casey Bodley <cbodley@redhat.com>

Closes #9995
2023-03-14 17:04:47 +01:00
Viktor Szakats
ebef55a61d
wolfssl: add quic/ngtcp2 detection in cmake, and fix builds
- add QUIC/ngtcp2 detection in CMake with wolfSSL.

  Because wolfSSL uses zlib if available, move compression detection
  before TLS detection. (OpenSSL might also need this in the future.)

- wolfSSL 5.5.0 started using C99 types in its `quic.h` header, but it
  doesn't #include the necessary C99 header itself, breaking builds
  (unless another dependency pulled it by chance.) Add local workaround
  for it. For this to work with all build tools, we had to fix our
  header detection first. Ref: #10745

  Ref: 6ad5f6ecc1

Closes #10739
2023-03-14 11:57:55 +00:00
Stefan Eissing
31889210b9
secure-transport: fix recv return code handling
Return code handling of recv calls were not always correct when an error
occured or the connection was closed.

Closes #10717
2023-03-14 09:59:27 +01:00
Stefan Eissing
06f65f771b http2: Use KEEP_SEND_HOLD for flow control in HTTP/2
- use the defined, but so far not used, KEEP_SEND_HOLD bit for flow
  control based suspend of sending in transfers.

Prior to this change KEEP_SEND_PAUSE bit was used instead, but that can
interfere with pausing streams from the user side via curl_easy_pause.

Fixes https://github.com/curl/curl/issues/10751
Closes https://github.com/curl/curl/pull/10753
2023-03-14 03:26:57 -04:00
Dan Fandrich
7caaeca6f6 tests: fix control code that hid some text in runtests.1 2023-03-13 17:21:02 -07:00
Dan Fandrich
caf5fd1759 tests: sync option lists in runtests.pl & its man page 2023-03-13 17:13:08 -07:00
Daniel Stenberg
bc90308328
multi: make multi_perform ignore/unignore signals less often
For improved performance

Reported-by: Jerome St-Louis
Ref: #10743
Closes #10750
2023-03-13 23:01:02 +01:00
Viktor Szakats
9f96537cc3
cmake: delete unused HAVE__STRTOI64
Also delete obsolete surrounding comments.

Reviewed-by: Daniel Stenberg
Closes #10756
2023-03-13 15:49:54 +00:00
Viktor Szakats
245773d775
CI: fix copyright header
Follow-up to 395b9175b7
2023-03-13 15:48:16 +00:00
Daniel Stenberg
c977fecf52
RELEASE-PROCEDURE.md: update coming release dates 2023-03-13 16:43:42 +01:00
Stefan Eissing
7fa6e36583
tests/http: add pytest to GHA and improve tests
- added to: ngtcp2-quictls, ngtcp2-gnutls and the linux varians
  quiche, bearssl, libressl, mbedtls, openssl3, rustls
- added disabled in ngtcp2-wolfssl due to weird SSL_connect() errors
  not reproducable locally

Improvements on pytest:

-  handling of systems with nghttpx in $PATH
   - configure will seach $PATH got nghttpx used in pytest
   - pytest fixes for managing nghttpx without h3 support
   - ngtcp2-wolfssl: use a fully enabled wolfssl build

- lower parallel count for http/1.1 tests, since we do not
   want to test excessive connections.
- check built curl for HTTPS-proxy support in proxy tests
- bearssl does not like one of our critical cert extensions, making
  it non-critical now
- bearssl is too slow for test_12, skipping
- making sure we do h3 tests only when curl and server support is there

Closes #10699
2023-03-13 14:06:57 +01:00
Marcel Raad
ff5c3455ce
tool_operate: silence unused parameter warning
`global` is only used in the `my_setopt` macro version without
`CURL_DISABLE_LIBCURL_OPTION` since commit 4774decf10a.

Closes https://github.com/curl/curl/pull/10752
2023-03-13 13:43:26 +01:00
Viktor Szakats
db073c9d88
build: fix stdint/inttypes detection with non-autotools
Fix `stdint.h` and `inttypes.h` detection with non-autotools builds on
Windows. (autotools already auto-detected them accurately.)

`lib/config-win32.h` builds (e.g. `Makefile.mk`):
- set `HAVE_STDINT_H` where supported.
- set `HAVE_INTTYPES_H` for MinGW.

CMake:
- auto-detect them on Windows. (They were both force-disabled.)
- delete unused `CURL_PULL_STDINT_H`.
- delete unused `CURL_PULL_INTTYPES_H`.
- stop detecting `HAVE_STDINT_H` twice.
  Present since the initial CMake commit: 4c5307b456

curl doesn't use these C99 headers, we need them now to workaround
broken wolfSSL builds. Ref: #10739

Once that clears up, we can delete these detections and macros (unless
we want to keep them for future us.)

Reviewed-by: Daniel Stenberg
Closes #10745
2023-03-13 10:47:21 +00:00
Daniel Stenberg
8f7d87cbf3
RELEASE-NOTES: synced 2023-03-13 09:11:14 +01:00
Daniel Stenberg
8f4608468b
ftp: add more conditions for connection reuse
Reported-by: Harry Sintonen
Closes #10730
2023-03-13 09:07:23 +01:00
Dan Fandrich
0cbfe32fb1 tests: make first.c the same for both lib tests and unit tests
The only difference used to be global variable used in unittest tests.
After cb7ed5a removed individual flag overrides for the unittests, first.c
was no longer recompiled for unit tests to include the flag, so whether it
worked or gave a link error depended on whether it was compiled in
libtest or unittest first. This way also speeds up the build by
eliminating 40 identical compile invocations.

Fixes #10749
2023-03-12 19:14:59 -07:00
Dan Fandrich
4e4a082eff tests: use AM_CPPFILES to modify flags in unit tests
Using CPPFLAGS sometimes caused odd compile issues when building tests
with parallel make and AM_CPPFILES is the right flag, anyway.

Follow-up to cb7ed5a

Ref #10749
2023-03-12 19:04:12 -07:00
Viktor Szakats
a285b22f8f
Makefile.mk: fix -g option in debug mode [ci skip]
Add it to `CFLAGS` (was: `LDFLAGS`).

Closes #10747
2023-03-13 00:16:30 +00:00
Jay Satiro
2f17a9b654 tool: improve --stderr handling
- freopen stderr with the user-specified file (--stderr file) instead of
  using a separate 'errors' stream.

- In tool_setup.h override stdio.h's stderr macro as global variable
  tool_stderr.

Both freopen and overriding the stderr macro are necessary because if
the user-specified filename is "-" then stdout is assigned to
tool_stderr and no freopen takes place. See the PR for more information.

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

Closes https://github.com/curl/curl/pull/10673
2023-03-12 00:58:40 -05:00
Dan Fandrich
395b9175b7 CI: don't run CI jobs if only another CI was changed
Also skip builds on non-Windows platforms when only Windows build files
have changed.

This should reduce the number of useless builds and the associated
waiting time and chance of spurious failures, freeing resources for
new PRs.

Closes #10742
2023-03-11 18:59:45 -08:00
Dan Fandrich
ee521a1c88 http: don't send 100-continue for short PUT requests
This is already how curl is documented to behave in Everything curl, but
in actuality only short POSTs skip this. This should knock 30 seconds
off a full run of the test suite since the 100-continue timeout will no
longer be hit.

Closes #10740
2023-03-11 18:57:19 -08:00
Dan Fandrich
970330bded tests: add DELAY keyword to more tests using waits 2023-03-11 18:57:19 -08:00
Dan Fandrich
13b4d050aa tests: hack to build most unit tests under cmake
These are only built when a libcurl static library is available, since
we're not building a special libcurlu library yet and these tests rely
on private symbols that aren't available in the shared library. A few
unit tests do require libcurlu, so those are not built.

Closes #10722
2023-03-11 18:54:21 -08:00
Dan Fandrich
29d7c3bdbd tests: fix MSVC unreachable code warnings in unit tests
Switch unit1654 to use the proper test macros as well.
2023-03-11 18:54:21 -08:00
Dan Fandrich
cb7ed5acf7 tests: make CPPFLAGS common to all unit tests
There's no need to specify them individually.
2023-03-11 18:54:21 -08:00
Dan Fandrich
a76322137b tests: keep cmake unit tests names in sync
Put only the test names into Makefile.inc so they can be used by both
cmake and automake. This will prevent the list of tests from becoming
out of date when they are also built under cmake.
2023-03-11 18:54:21 -08:00
Viktor Szakats
079079b2fd
src: silence wmain() warning for all build methods
llvm/clang and gcc doesn't recognize the wmain() function in Unicode
Windows builds:

llvm/clang:
```
../../src/tool_main.c:239:5: warning: no previous prototype for function 'wmain' [-Wmissing-prototypes]
int wmain(int argc, wchar_t *argv[])
    ^
1 warning generated.
```

gcc:
```
../../src/tool_main.c:239:5: warning: no previous prototype for 'wmain' [-Wmissing-prototypes]
  239 | int wmain(int argc, wchar_t *argv[])
      |     ^~~~~
```

Before this patch, we already silenced it with CMake. This patch moves
the silencing to the source, so that it applies to all build tools.

Bug: https://github.com/curl/curl/issues/7229#issuecomment-1464806651

Reviewed-by: Marcel Raad
Closes #10744
2023-03-11 15:21:43 +00:00
Dan Fandrich
c2b7249db2 CI: fix retrying on brew failures
The previous attempt didn't consider that the shell would exit
immediately after the false statement in the retry case.

Follow-up to dc141a37
2023-03-10 16:41:25 -08:00