]> git.ipfire.org Git - thirdparty/curl.git/commit
conncache: use the closure handle when disconnecting surplus connections
authorDaniel Stenberg <daniel@haxx.se>
Sat, 25 Nov 2023 23:10:17 +0000 (00:10 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 26 Nov 2023 16:49:15 +0000 (17:49 +0100)
commitdbf4c4030a95b610cf86aa576ba7676736f81dc3
tree9f9bd4f97c16d0b0ddc185ec97e69465eaf8f4a1
parent50a1c30b91f91139a13ec352d08c383699b183df
conncache: use the closure handle when disconnecting surplus connections

Use the closure handle for disconnecting connection cache entries so
that anything that happens during the disconnect is not stored and
associated with the 'data' handle which already just finished a transfer
and it is important that details from the unrelated disconnect does not
taint meta-data in the data handle.

Like storing the response code.

This also adjust test 1506. Unfortunately it also removes a key part of
the test that verifies that a connection is closed since when this
output vanishes (because the closure handle is used), we don't know
exactly that the connection actually gets closed in this test...

Reported-by: ohyeaah on github
Fixes #12367
Closes #12405
lib/conncache.c
tests/data/test1506