# Server-side
<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK\r
-Content-Length: 3\r
+<data>
+HTTP/1.1 404 Not Found\r
+Content-Length: 0\r
Connection: close\r
\r
-hi
</data>
</reply>
--write-out with %{onerror} and %{urlnum} to stderr
</name>
<command>
-http://non-existing-host.haxx.se:%NOLISTENPORT/we/want/our/1188 http://%HOSTIP:%HTTPPORT/we/want/our/1188 -w '%{onerror}%{stderr}%{urlnum} says %{exitcode} %{errormsg}\n' -s
+-f -s -w '%{onerror}%{stderr}%{urlnum} says %{exitcode} %{errormsg}\n' http://%HOSTIP:%HTTPPORT/we/want/our/1188 http://%HOSTIP:%HTTPPORT/we/want/our/1188
</command>
</client>
User-Agent: curl/%VERSION\r
Accept: */*\r
\r
+GET /we/want/our/1188 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
</protocol>
<stderr mode="text">
-0 says 6 Could not resolve host: non-existing-host.haxx.se
+0 says 22 The requested URL returned error: 404
+1 says 22 The requested URL returned error: 404
</stderr>
+# 22 is CURLE_HTTP_RETURNED_ERROR
+<errorcode>
+22
+</errorcode>
</verify>
</testcase>