CURLOPT_OPENSOCKETFUNCTION: return error at once
When CURL_SOCKET_BAD is returned in the callback, it should be treated as an error (CURLE_COULDNT_CONNECT) if no other socket is subsequently created when trying to connect to a server. Bug: http://curl.haxx.se/mail/lib-2015-06/0047.html
This commit is contained in:
@@ -153,7 +153,7 @@ test1516 \
|
||||
\
|
||||
test1520 \
|
||||
\
|
||||
test1525 test1526 test1527 test1528 test1529 \
|
||||
test1525 test1526 test1527 test1528 test1529 test1530 \
|
||||
\
|
||||
test1600 test1601 test1602 \
|
||||
\
|
||||
|
||||
27
tests/data/test1530
Normal file
27
tests/data/test1530
Normal file
@@ -0,0 +1,27 @@
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
CURLOPT_OPENSOCKETFUNCTION
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<tool>
|
||||
lib1530
|
||||
</tool>
|
||||
<name>
|
||||
CURLOPT_OPENSOCKETFUNCTION returns bad socket
|
||||
</name>
|
||||
</client>
|
||||
|
||||
# it should be detected and an error should be reported
|
||||
<verify>
|
||||
# 7 == CURLE_COULDNT_CONNECT
|
||||
<errorcode>
|
||||
7
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Reference in New Issue
Block a user