Commit Graph

172 Commits

Author SHA1 Message Date
Stefan Eissing
e497a96a0e
tests: rename tests/tests-httpd to tests/http
- httpd is only one server we test with
 - the suite coveres the HTTP protocol in general where
   the default test cases need a more beefy environment

Closes #10654
2023-03-02 14:05:19 +01:00
Daniel Stenberg
aa31f9a856
Revert "GHA: add Microsoft C++ Code Analysis"
This reverts commit e0db842b2a.

This tool seems very restricted in how often it might be used by a
project and thus very quickly start to report fails simply because it
refuses to run when "there are more runs than allowed".

Closes #10613
2023-02-26 23:05:12 +01:00
Philip H
4b3dc4b452
ngtcp2-gnutls.yml: bump to gnutls 3.8.0
Closes #10507
2023-02-25 00:12:44 +01:00
Philip H
8bd5a13dc3
CI: update ngtcp2 and nghttp2 for pytest
Follow-up: 5c9ee8cef4

Closes #10508
2023-02-25 00:11:46 +01:00
andy5995
8125822e6e
GHA: use same flags for Slackbuild as Slack package
Closes #10526
2023-02-25 00:10:25 +01:00
Daniel Stenberg
e0db842b2a
GHA: add Microsoft C++ Code Analysis
Closes #10583
2023-02-21 22:51:19 +01:00
Jacob Hoffman-Andrews
30411d7278
GHA: update rustls dependency to 0.9.2
This allows re-enabling test 312 for the rustls backend.

Closes #10553
2023-02-18 09:53:58 +01:00
Stefan Eissing
4437e3e344
test: add test for HTTP/2 corruption as reported in #10525
- adding test_02_20 for reproducing the situation
- using recently released mod_h2 Apache module
- skipping test if an older version is installed
- adding installation of current mod_h2 to github pytest workflow

This reproduces the error reliable (for me) on the lib/http2.c version
of curl 7.88.0. And passes with the recent curl master.

Closes #10534
2023-02-17 09:17:04 +01:00
Philip H
6f20596768
CI: update wolfssl / wolfssh to 5.5.4 / 1.4.12
Closes #10493
2023-02-13 17:13:32 +01:00
Tatsuhiro Tsujikawa
5c9ee8cef4
GHA: bump ngtcp2 workflow dependencies
Closes #10494
2023-02-13 17:07:49 +01:00
Philip H
82348603e8
Linux CI: Bump rustls-ffi to v0.9.1
Closes #10476
2023-02-12 12:36:25 +01:00
Philip H
bd12f27258
Linux CI: update some dependecies to latest tag
Closes #10458
2023-02-10 08:35:58 +01:00
Dan Fandrich
c4095faebf CI: Add more labeler match patterns 2023-02-09 15:21:07 -08:00
Dan Fandrich
bfb9838380 CI: Retry failed downloads to reduce spurious failures
A temporary error with a remote server shouldn't cause a CI run to fail.
Also, put a cap on the time to download to fail faster on a misbehaving
server or connection and use HTTP compression where possible to reduce
download times.
2023-02-09 15:18:04 -08:00
Daniel Stenberg
528583cf77
GHA: enable websockets in the torture job
Closes #10448
2023-02-09 18:54:17 +01:00
andy5995
4f051d0e54
GHA: move Slackware test into matrix
Closes #10412
2023-02-06 09:57:53 +01:00
Philip H
b87664445c
GHA/macos.yml: bump to gcc-12
Closes #10415
2023-02-06 08:20:03 +01:00
Stefan Eissing
671158242d
connections: introduce http/3 happy eyeballs
New cfilter HTTP-CONNECT for h3/h2/http1.1 eyeballing.
- filter is installed when `--http3` in the tool is used (or
  the equivalent CURLOPT_ done in the library)
- starts a QUIC/HTTP/3 connect right away. Should that not
  succeed after 100ms (subject to change), a parallel attempt
  is started for HTTP/2 and HTTP/1.1 via TCP
- both attempts are subject to IPv6/IPv4 eyeballing, same
  as happens for other connections
- tie timeout to the ip-version HAPPY_EYEBALLS_TIMEOUT
- use a `soft` timeout at half the value. When the soft timeout
  expires, the HTTPS-CONNECT filter checks if the QUIC filter
  has received any data from the server. If not, it will start
  the HTTP/2 attempt.

HTTP/3(ngtcp2) improvements.
- setting call_data in all cfilter calls similar to http/2 and vtls filters
  for use in callback where no stream data is available.
- returning CURLE_PARTIAL_FILE for prematurely terminated transfers
- enabling pytest test_05 for h3
- shifting functionality to "connect" UDP sockets from ngtcp2
  implementation into the udp socket cfilter. Because unconnected
  UDP sockets are weird. For example they error when adding to a
  pollset.

HTTP/3(quiche) improvements.
- fixed upload bug in quiche implementation, now passes 251 and pytest
- error codes on stream RESET
- improved debug logs
- handling of DRAIN during connect
- limiting pending event queue

HTTP/2 cfilter improvements.
- use LOG_CF macros for dynamic logging in debug build
- fix CURLcode on RST streams to be CURLE_PARTIAL_FILE
- enable pytest test_05 for h2
- fix upload pytests and improve parallel transfer performance.

GOAWAY handling for ngtcp2/quiche
- during connect, when the remote server refuses to accept new connections
  and closes immediately (so the local conn goes into DRAIN phase), the
  connection is torn down and a another attempt is made after a short grace
  period.
  This is the behaviour observed with nghttpx when we tell it to  shut
  down gracefully. Tested in pytest test_03_02.

TLS improvements
- ALPN selection for SSL/SSL-PROXY filters in one vtls set of functions, replaces
  copy of logic in all tls backends.
- standardized the infof logging of offered ALPNs
- ALPN negotiated: have common function for all backends that sets alpn proprty
  and connection related things based on the negotiated protocol (or lack thereof).

- new tests/tests-httpd/scorecard.py for testing h3/h2 protocol implementation.
  Invoke:
    python3 tests/tests-httpd/scorecard.py --help
  for usage.

Improvements on gathering connect statistics and socket access.
- new CF_CTRL_CONN_REPORT_STATS cfilter control for having cfilters
  report connection statistics. This is triggered when the connection
  has completely connected.
- new void Curl_pgrsTimeWas(..) method to report a timer update with
  a timestamp of when it happend. This allows for updating timers
  "later", e.g. a connect statistic after full connectivity has been
  reached.
- in case of HTTP eyeballing, the previous changes will update
  statistics only from the filter chain that "won" the eyeballing.
- new cfilter query CF_QUERY_SOCKET for retrieving the socket used
  by a filter chain.
  Added methods Curl_conn_cf_get_socket() and Curl_conn_get_socket()
  for convenient use of this query.
- Change VTLS backend to query their sub-filters for the socket when
  checks during the handshake are made.

HTTP/3 documentation on how https eyeballing works.

TLS improvements
- ALPN selection for SSL/SSL-PROXY filters in one vtls set of functions, replaces
  copy of logic in all tls backends.
- standardized the infof logging of offered ALPNs
- ALPN negotiated: have common function for all backends that sets alpn proprty
  and connection related things based on the negotiated protocol (or lack thereof).

Scorecard with Caddy.
- configure can be run with `--with-test-caddy=path` to specify which caddy to use for testing
- tests/tests-httpd/scorecard.py now measures download speeds with caddy

pytest improvements
- adding Makfile to clean gen dir
- adding nghttpx rundir creation on start
- checking httpd version 2.4.55 for test_05 cases where it is needed. Skipping with message if too old.
- catch exception when checking for caddy existance on system.

Closes #10349
2023-02-02 09:57:34 +01:00
Daniel Stenberg
b7aaf074e5
CODEOWNERS: remove the peeps mentioned as CI owners
These owners do not have the bandwidth/energy to do the reviews which
makes PRs stall and this ownership claim flawed. We can bring people
back when the situation is different.

Follow-up to c04c78ac87

Closes #10386
2023-02-02 08:42:29 +01:00
Philip H
92d4053afd
GHA/macos: use Xcode_14.0.1 for cmake builds
Fixes #10356
Closes #10381
2023-02-01 11:36:40 +01:00
Stefan Eissing
91eb197a9e
CI: add pytest github workflow to CI test/tests-httpd on a HTTP/3 setup
Closes #10317
2023-01-31 12:04:23 +01:00
Daniel Stenberg
be5f6c3124
zuul: stop using this CI service
The important jobs have already transitioned. The remaining ones we can
skip for now.

Closes #10368
2023-01-30 15:42:15 +01:00
Dan Fandrich
ffe3e3c4e1 CI: Work around a labeler bug that removes labels 2023-01-28 19:48:02 -08:00
Dan Fandrich
7d01a4499f CI: Add even more paths to the labeler config (#10326) 2023-01-25 18:15:10 -08:00
Dan Fandrich
54189d8b81 CI: Add a few more paths to the labeler config (#10326) 2023-01-25 15:03:37 -08:00
Dan Fandrich
de8cc2108a CI: Switch the labeler event to pull_request_target
Otherwise, the action won't work on PRs from forked repositories
(#10326).
2023-01-25 10:43:47 -08:00
Dan Fandrich
3eabedc027 CI: Add a workflow to automatically label pull requests
The labeler language is quite restrictive right now so labels are added
quite conservatively, meaning that many PRs won't get labels when it's
"obvious" they should. It will still save some manual work on those
that it can label.
2023-01-23 18:18:00 -08:00
Nick Banks
9f0c7795eb
msh3: update to v0.6
Closes #10192
2023-01-10 13:50:08 +01:00
Stefan Eissing
33ac97e1cb
tests-httpd: basic infra to run curl against an apache httpd plus nghttpx for h3
- adding '--with-test-httpd=<path>' to configure non-standard apache2
  install
- python env and base classes for running httpd
- basic tests for connectivity with h1/h2/h3
- adding test cases for truncated responses in http versions.
- adding goaway test for HTTP/3.
- adding "stuttering" tests with parallel downloads in chunks with
  varying delays between chunks.

- adding a curltest module to the httpd server, adding GOAWAY test.
    - mod_curltest now installs 2 handlers
      - 'echo': writing as response body what came as request body
      - 'tweak': with query parameters to tweak response behaviour
- marked known fails as skip for now

Closes #10175
2023-01-09 17:40:04 +01:00
Daniel Stenberg
0978b2ef25
.github/workflows/linux.yml: add a quiche CI job
Move over from zuul

Closes #10241
2023-01-09 11:09:33 +01:00
Tatsuhiro Tsujikawa
3022eeaefe
GHA: use designated ngtcp2 and its dependencies versions
Designate ngtcp2 and its dependency versions so that the CI build does
not fail without our control.

Closes #10257
2023-01-08 20:31:52 +01:00
andy5995
f92aae86c6
GHA: add job on Slackware 15.0
Closes #10230
2023-01-05 23:44:48 +01:00
andy5995
21f5b6bfb7
GHA: Hacktoberfest CI: Update deprecated 'set-output' command
Closes #10221
2023-01-05 10:12:57 +01:00
Daniel Stenberg
2bc1d775f5
copyright: update all copyright lines and remove year ranges
- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- saves us from pointless churn
- git keeps history for us
- the year range is kept in COPYING

checksrc is updated to allow non-year using copyright statements

Closes #10205
2023-01-03 09:19:21 +01:00
Philip H
4556665ad1
Linux CI: update some dependecies to latest tag
Closes #10195
2023-01-02 11:56:49 +01:00
andy5995
92abdaf8e2
GHA: ignore changes to md files for most workflows
Closes #10176
2023-01-02 00:13:02 +01:00
Daniel Stenberg
5ab72b9a57
HTTP3: mention what needs to be in place to remove EXPERIMENTAL label
Closes #10168
2022-12-28 09:20:12 +01:00
Daniel Stenberg
901392cbb7
urlapi: add CURLU_PUNYCODE
Allows curl_url_get() get the punycode version of host names for the
host name and URL parts.

Extend test 1560 to verify.

Closes #10109
2022-12-26 23:29:23 +01:00
Nick Banks
72b819f147
msh3: update to v0.5 Release
Closes #10125
2022-12-22 14:29:40 +01:00
andy5995
3736c0a209
workflows/linux.yml: merge 3 common packages
Closes #10071
2022-12-22 08:59:08 +01:00
Philip H
5f5660f3a0 CI/spell: actions/checkout@v2 > actions/checkout@v3 2022-12-19 23:15:07 +00:00
Max Dymond
a4fd257c1b ci: Reuse fuzzing snippet from curl-fuzzer project 2022-12-02 22:22:06 +00:00
Diogo Teles Sant'Anna
a2f5a4ca6f
GHA: clarify workflows permissions, set least possible privilege
Set top-level permissions to None on all workflows, setting per-job
permissions. This avoids that new jobs inherit unwanted permissions.

Discussion: https://curl.se/mail/lib-2022-11/0028.html

Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>

Closes #9928
2022-12-02 23:13:54 +01:00
Stefan Eissing
ca15b7512e
tests: add HTTP/3 test case, custom location for proper nghttpx
- adding support for HTTP/3 test cases via a nghttpx server that is
  build with ngtcp2 and nghttp3.
- test2500 is the first test case, performing a simple GET.
- nghttpx is checked for support and the 'feature' nghttpx-h3
  is set accordingly. test2500 will only run, when supported.
- a specific nghttpx location can be given in the environment
  variable NGHTTPX or via the configure option
    --with-test-nghttpx=<path>

Extend NGHTTPX config to H2 tests as well

* use $ENV{NGHTTPX} and the configured default also in http2 server starts
* always provide the empty test/nghttpx.conf to nghttpx. as it defaults to
  reading /etc/nghttpx/nghttpx.conf otherwise.

Added nghttpx to CI ngtcp2 jobs to run h3 tests.

Closes #9031
2022-11-30 13:56:06 +01:00
Philip H
4c61a8e8f4
GHA: NSS use clang instead of clang-9
Closes #9978
2022-11-25 08:59:22 +01:00
Viktor Szakats
a8861b6ccd
Makefile.mk: portable Makefile.m32
Update bare GNU Make `Makefile.m32` to:

- Move objects into a subdirectory.
- Add support for MS-DOS. Tested with DJGPP.
- Add support for Watt-32 (on MS-DOS).
- Add support for AmigaOS.
- Rename `Makefile.m32` to `Makefile.mk`
- Replace `ARCH` with `TRIPLET`.
- Build `tool_hugehelp.c` proper (when tools are available).
- Drop MS-DOS compatibility macro `USE_ZLIB` (replaced by `HAVE_LIBZ`)
- Add support for `ZLIB_LIBS` to override `-lz`.
- Omit object files when building examples.
- Default `CC` to `gcc` once again, for convenience. (Caveat: compiler
  name `cc` cannot be set now.)
- Set `-DCURL_NO_OLDIES` for examples, like autotools does.
- Delete `makefile.dj` files. Notice the configuration details and
  defaults are not retained with the new method.
- Delete `makefile.amiga` files. A successful build needs a few custom
  options. We're also not retaining all build details from the existing
  Amiga make files.
- Rename `Makefile.m32` to `Makefile.mk` to reflect that they are not
  Windows/MinGW32-specific anymore.
- Add support for new `CFG` options: `-map`, `-debug`, `-trackmem`
- Set `-DNDEBUG` by default.
- Allow using `-DOS=...` in all `lib/config-*.h` headers, syncing this
  with `config-win32.h`.
- Look for zlib parts in `ZLIB_PATH/include` and `ZLIB_PATH/lib`
  instead of bare `ZLIB_PATH`.

Note that existing build configurations for MS-DOS and AmigaOS likely
become incompatible with this change.

Example AmigaOS configuration:
```
export CROSSPREFIX=/opt/amiga/bin/m68k-amigaos-
export CC=gcc
export CPPFLAGS='-DHAVE_PROTO_BSDSOCKET_H'
export CFLAGS='-mcrt=clib2'
export LDFLAGS="${CFLAGS}"
export LIBS='-lnet -lm'
make -C lib -f Makefile.mk
make -C src -f Makefile.mk
```

Example MS-DOS configuration:
```
export CROSSPREFIX=/opt/djgpp/bin/i586-pc-msdosdjgpp-
export WATT_PATH=/opt/djgpp/net/watt
export ZLIB_PATH=/opt/djgpp
export OPENSSL_PATH=/opt/djgpp
export OPENSSL_LIBS='-lssl -lcrypt'
export CFG=-zlib-ssl
make -C lib -f Makefile.mk
make -C src -f Makefile.mk
```

Closes #9764
2022-11-22 08:28:41 +00:00
Alexandre Ferrieux
49798cac83
CURLOPT_QUICK_EXIT: don't wait for DNS thread on exit
Fixes #2975
Closes #9147
2022-11-18 00:17:27 +01:00
Daniel Stenberg
988c1c12f5
Revert "GHA: add scorecard.yml"
This reverts commit ca76c79b34.
2022-11-09 10:29:19 +01:00
Daniel Stenberg
ca76c79b34
GHA: add scorecard.yml
add a "scorecard" scanner job
2022-11-09 10:10:33 +01:00
Daniel Stenberg
d4fed2a13a
docs: explain the noproxy CIDR notation support
Follow-up to 1e9a538e05

Closes #9818
2022-10-28 09:02:22 +02:00