multi: shut down CONNECT in Curl_detach_connnection

... to prevent a lingering pointer that would lead to a double-free.

Added test 1939 to verify.

Reported-by: Stephen M. Coakley
Fixes #7982
Closes #7986
This commit is contained in:
Daniel Stenberg 2021-11-10 14:42:04 +01:00
parent 11a46d6d66
commit f0b7099a10
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 138 additions and 7 deletions

View file

@ -216,7 +216,7 @@ test1800 test1801 \
test1908 test1909 test1910 test1911 test1912 test1913 test1914 test1915 \
test1916 test1917 test1918 \
\
test1933 test1934 test1935 test1936 test1937 test1938 \
test1933 test1934 test1935 test1936 test1937 test1938 test1939 \
\
test2000 test2001 test2002 test2003 test2004 \
\

52
tests/data/test1939 Normal file
View file

@ -0,0 +1,52 @@
<testcase>
<info>
<keywords>
CONNECT
curl_easy_cleanup
</keywords>
</info>
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Type: text/html
Content-Length: 0
Location: /%TESTNUMBER0002
</data>
<data2>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Type: text/html
Content-Length: 0
</data2>
</reply>
# Client-side
<client>
<server>
https
http-proxy
</server>
<name>
curl_easy_cleanup without curl_multi_remove_handle - in CONNECT
</name>
<tool>
lib%TESTNUMBER
</tool>
<command>
https://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%PROXYPORT
</command>
</client>
# Verify data after the test has been "shot"
<verify>
</verify>
</testcase>