mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:43:39 +03:00
easy: make curl_easy_perform() return error if connection still there
This typically happens if CURL_CONNECT_ONLY is used and a second curl_easy_perform() is attempted. A connection "taken over" with CURL_CONNECT_ONLY cannot be ended any other way than a curl_easy_cleanup() on the easy handle that holds it. Add test 696 to verify. Closes #16003
This commit is contained in:
parent
2f8ecd5dbd
commit
be82a3605a
5 changed files with 71 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ test652 test653 test654 test655 test656 test658 test659 test660 test661 \
|
|||
test662 test663 test664 test665 test666 test667 test668 test669 test670 \
|
||||
test671 test672 test673 test674 test675 test676 test677 test678 test679 \
|
||||
test680 test681 test682 test683 test684 test685 test686 test687 test688 \
|
||||
test689 test690 test691 test692 test693 test694 test695 \
|
||||
test689 test690 test691 test692 test693 test694 test695 test696 \
|
||||
\
|
||||
test700 test701 test702 test703 test704 test705 test706 test707 test708 \
|
||||
test709 test710 test711 test712 test713 test714 test715 test716 test717 \
|
||||
|
|
|
|||
52
tests/data/test696
Normal file
52
tests/data/test696
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Server: test-server/fake
|
||||
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
Content-Length: 6
|
||||
Connection: close
|
||||
|
||||
-foo-
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<tool>
|
||||
lib%TESTNUMBER
|
||||
</tool>
|
||||
<name>
|
||||
CONNECT_ONLY and doing a second curl_easy_perform
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
GET /556 HTTP/1.1
|
||||
Host: ninja
|
||||
|
||||
</protocol>
|
||||
|
||||
# 43 == CURLE_BAD_FUNCTION_ARGUMENT
|
||||
<errorcode>
|
||||
43
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue