From 20ac3458068b2bd11c3ce802f091af66b55e2c23 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 9 Jun 2015 00:22:02 +0200 Subject: 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 --- tests/data/test1530 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/data/test1530 (limited to 'tests/data/test1530') diff --git a/tests/data/test1530 b/tests/data/test1530 new file mode 100644 index 000000000..92abc6ce4 --- /dev/null +++ b/tests/data/test1530 @@ -0,0 +1,27 @@ + + + +CURLOPT_OPENSOCKETFUNCTION + + + + + +none + + +lib1530 + + +CURLOPT_OPENSOCKETFUNCTION returns bad socket + + + +# it should be detected and an error should be reported + +# 7 == CURLE_COULDNT_CONNECT + +7 + + + -- cgit v1.2.3