]> git.ipfire.org Git - thirdparty/curl.git/commit
url: fix logic in connection reuse to deny reuse on "unclean" connections
authorStefan Eissing <stefan@eissing.org>
Mon, 6 Mar 2023 11:44:45 +0000 (12:44 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Mar 2023 11:50:31 +0000 (12:50 +0100)
commit7c5637b8b4b8a5a125ba1556e50e4b092075a6a7
treee671c307e08cc7eb2418a703a1870001d8c31855
parent6466071e8e85011057dfad4cc860029e391edeb8
url: fix logic in connection reuse to deny reuse on "unclean" connections

- add parameter to `conn_is_alive()` cfilter method that returns
  if there is input data waiting on the connection
- refrain from re-using connnection from the cache that have
  input pending
- adapt http/2 and http/3 alive checks to digest pending input
  to check the connection state
- remove check_cxn method from openssl as that was just doing
  what the socket filter now does.
- add tests for connection reuse with special server configs

Closes #10690
17 files changed:
lib/cf-socket.c
lib/cf-socket.h
lib/cfilters.c
lib/cfilters.h
lib/http2.c
lib/rtsp.c
lib/url.c
lib/vquic/curl_msh3.c
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_quiche.c
lib/vtls/nss.c
lib/vtls/openssl.c
lib/vtls/sectransp.c
lib/vtls/vtls.c
tests/http/test_03_goaway.py
tests/http/test_12_reuse.py [new file with mode: 0644]
tests/http/testenv/httpd.py