summaryrefslogtreecommitdiff
path: root/tests/data/test1530
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-06-09 00:22:02 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-06-09 00:22:02 +0200
commit20ac3458068b2bd11c3ce802f091af66b55e2c23 (patch)
tree5c39522dfcf7c26d0d40a7469a13e54f7a946dad /tests/data/test1530
parenteaeeed2e8f20775421beacfbd394ff4fe99ab685 (diff)
downloadcurl-20ac3458068b2bd11c3ce802f091af66b55e2c23.tar.gz
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
Diffstat (limited to 'tests/data/test1530')
-rw-r--r--tests/data/test153027
1 files changed, 27 insertions, 0 deletions
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 @@
+<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>