curl/tests/data/test2308
Daniel Stenberg 9b802e2d19
libtest: 2308 verifies CURLE_WRITE_ERROR after write callback error
Verifies that the issue in #13669 actually is fixed. This return code is
what the CURLOPT_WRITEFUNCTION manpage documents should be returned.

This code is mostly from the
Source-written-by: Trumeet on github
Closes #13671
2024-05-16 13:46:52 +02:00

58 lines
850 B
Plaintext

<testcase>
<info>
<keywords>
HTTP
HTTP GET
</keywords>
</info>
#
# This reproduces the #13669 issue
<reply>
<data nocheck="yes">
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Content-Length: 6
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
</reply>
# Client-side
<client>
<server>
http
</server>
# tool to run
<tool>
lib%TESTNUMBER
</tool>
<name>
verify return code when write callback returns error
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
<stdout mode="text">
Returned 23, should be 23.
</stdout>
</verify>
</testcase>