curl/tests/http
Graham Campbell 820c014578 cfilters: fix event-based connection shutdown
- Adjust pollset during connection shutdown.

- Separate the FIRSTSOCKET and SECONDSOCKET check so that one being in
  connect or shutdown no longer adds poll events for the other.

- Fix shutdown state evaluation (as detailed below).

- Add a unit test for Curl_conn_adjust_pollset.

- Add a client for event testing.

- Test that shutdown sockets stay with the socket callback until done.

The pollset predicate now reads the connection's own shutdown state
rather than going through data->conn, and the EXPIRE_SHUTDOWN arming in
cshutdn_perform() works again: next_expire_ms started at 0 and could
never be set, so a peer that never sends a close_notify would still park
its connection forever, timeout or not.

Reported-by: pszemus@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/22282
Closes https://github.com/curl/curl/pull/22304
2026-07-17 04:00:56 -04:00
..
testenv hostip: only cache negative resolves for authoritative answers 2026-07-13 11:27:16 +02:00
.gitignore tidy-up: mostly whitespace nits 2023-08-31 23:02:10 +00:00
CMakeLists.txt HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
config.ini.in HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC) 2026-05-27 08:49:53 +02:00
conftest.py FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
Makefile.am ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
requirements.txt GHA: bump pip cryptography from 46.0.7 to 48.0.1 2026-06-16 22:18:43 +02:00
scorecard.py lib: ratelimit timestamps 2026-07-13 11:53:00 +02:00
test_01_basic.py tests: alphabetize and group Python imports & add check 2026-04-08 10:28:05 -07:00
test_02_download.py conncache: apply multi limits to transfers using a shared pool 2026-07-12 15:08:31 -04:00
test_03_goaway.py tests: alphabetize and group Python imports & add check 2026-04-08 10:28:05 -07:00
test_04_stuttered.py tests: alphabetize and group Python imports & add check 2026-04-08 10:28:05 -07:00
test_05_errors.py tidy-up: miscellaneous 2026-06-09 11:07:55 +02:00
test_06_eyeballs.py tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
test_07_upload.py pytest: close file handles after use, and two minor tidy-ups 2026-06-09 02:05:21 +02:00
test_08_caddy.py pytest: close file handles after use, and two minor tidy-ups 2026-06-09 02:05:21 +02:00
test_09_push.py tidy-up: add space around operators, where missing 2026-05-28 10:12:00 +02:00
test_10_proxy.py tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
test_11_unix.py unix-sockets: ignore proxy settings 2026-05-16 18:49:46 +02:00
test_12_reuse.py tests: pin connection reuse rules for partial, host, and credentials 2026-06-30 09:57:00 +02:00
test_13_proxy_auth.py pytest: close file handles after use, and two minor tidy-ups 2026-06-09 02:05:21 +02:00
test_14_auth.py tidy-up: miscellaneous 2026-06-01 22:33:57 +02:00
test_15_tracing.py tests: alphabetize and group Python imports & add check 2026-04-08 10:28:05 -07:00
test_16_info.py tidy-up: add space around operators, where missing 2026-05-28 10:12:00 +02:00
test_17_ssl_use.py pytest: close file handles after use, and two minor tidy-ups 2026-06-09 02:05:21 +02:00
test_18_methods.py tidy-up: add space around operators, where missing 2026-05-28 10:12:00 +02:00
test_19_shutdown.py cfilters: fix event-based connection shutdown 2026-07-17 04:00:56 -04:00
test_20_websockets.py ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
test_21_resolve.py hostip: only cache negative resolves for authoritative answers 2026-07-13 11:27:16 +02:00
test_22_httpsrr.py pythonlint.sh: make it fail on error, fix ruff warnings in pytest 2026-05-13 22:59:36 +02:00
test_30_vsftpd.py pytest: close file handles after use, and two minor tidy-ups 2026-06-09 02:05:21 +02:00
test_31_vsftpds.py FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
test_32_ftps_vsftpd.py FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
test_40_socks.py lib: transfer origin and proxy handling 2026-06-12 23:52:00 +02:00
test_50_scp.py pytest: close file handles after use, and two minor tidy-ups 2026-06-09 02:05:21 +02:00
test_51_sftp.py pytest: close file handles after use, and two minor tidy-ups 2026-06-09 02:05:21 +02:00
test_60_h3_proxy.py tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00