curl/tests/data/test207
Daniel Stenberg 7b4d44e045
test207: accept a different error code for hyper
It returns HYPERE_UNEXPECTED_EOF for this case which we convert to the
somewhat generic CURLE_RECV_ERROR.

Closes #7889
2021-10-22 12:53:46 +02:00

71 lines
1.1 KiB
Plaintext

<testcase>
<info>
<keywords>
HTTP
HTTP GET
CURLE_PARTIAL_FILE
FAILURE
chunked Transfer-Encoding
</keywords>
</info>
#
# Server-side
<reply>
<data>
HTTP/1.1 200 funky chunky! swsclose
Server: fakeit/0.9 fakeitbad/1.0
Transfer-Encoding: chunked
Connection: mooo
41
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
</data>
<datacheck>
HTTP/1.1 200 funky chunky! swsclose
Server: fakeit/0.9 fakeitbad/1.0
Transfer-Encoding: chunked
Connection: mooo
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
</datacheck>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<name>
HTTP GET with chunked Transfer-Encoding closed prematurely
</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
User-Agent: curl/%VERSION
Accept: */*
</protocol>
# curl: (18) transfer closed with outstanding read data remaining
# 18 == CURLE_PARTIAL_FILE
# 56 == CURLE_RECV_ERROR
<errorcode>
%if hyper
56
%else
18
%endif
</errorcode>
</verify>
</testcase>