xref: /third_party/curl/tests/data/test1425 (revision 13498266)
113498266Sopenharmony_ci<testcase>
213498266Sopenharmony_ci<info>
313498266Sopenharmony_ci<keywords>
413498266Sopenharmony_ciHTTP
513498266Sopenharmony_cibinary-stdout
613498266Sopenharmony_ci</keywords>
713498266Sopenharmony_ci</info>
813498266Sopenharmony_ci
913498266Sopenharmony_ci<reply>
1013498266Sopenharmony_ci<real_data>
1113498266Sopenharmony_ciHTTP/1.1 200 OK
1213498266Sopenharmony_ciDate: Tue, 09 Nov 2010 14:49:00 GMT
1313498266Sopenharmony_ciServer: test-server/fake
1413498266Sopenharmony_ciLast-Modified: Tue, 13 Jun 2000 12:10:00 GMT
1513498266Sopenharmony_ciETag: 21025-dc7-39462498
1613498266Sopenharmony_ciAccept-Ranges: bytes
1713498266Sopenharmony_ciContent-Length: 5
1813498266Sopenharmony_ciConnection: close
1913498266Sopenharmony_ciContent-Type: text/html
2013498266Sopenharmony_ciFunny-head: yesyes
2113498266Sopenharmony_ci
2213498266Sopenharmony_ci1234
2313498266Sopenharmony_ci</real_data>
2413498266Sopenharmony_ci
2513498266Sopenharmony_ci# Provided as base64 encoded to get the binary zero in the body treated
2613498266Sopenharmony_ci# properly. Tricky to generate correctly.
2713498266Sopenharmony_ci<data base64="yes" nocheck="yes">
2813498266Sopenharmony_ciSFRUUC8xLjEgMjAwIE9LCkRhdGU6IFR1ZSwgMDkgTm92IDIwMTAgMTQ6NDk6MDAgR01UClNlcnZl
2913498266Sopenharmony_cicjogdGVzdC1zZXJ2ZXIvZmFrZQpMYXN0LU1vZGlmaWVkOiBUdWUsIDEzIEp1biAyMDAwIDEyOjEw
3013498266Sopenharmony_ciOjAwIEdNVApFVGFnOiAyMTAyNS1kYzctMzk0NjI0OTgKQWNjZXB0LVJhbmdlczogYnl0ZXMKQ29u
3113498266Sopenharmony_cidGVudC1MZW5ndGg6IDUKQ29ubmVjdGlvbjogY2xvc2UKQ29udGVudC1UeXBlOiB0ZXh0L2h0bWwK
3213498266Sopenharmony_ciRnVubnktaGVhZDogeWVzeWVzCgoAMTIzNAo=
3313498266Sopenharmony_ci</data>
3413498266Sopenharmony_ci</reply>
3513498266Sopenharmony_ci
3613498266Sopenharmony_ci#
3713498266Sopenharmony_ci# Client-side
3813498266Sopenharmony_ci<client>
3913498266Sopenharmony_ci<server>
4013498266Sopenharmony_cihttp
4113498266Sopenharmony_ci</server>
4213498266Sopenharmony_ci
4313498266Sopenharmony_ci# this test needs to be a debug build in order to fake it being a TTY output
4413498266Sopenharmony_ci<features>
4513498266Sopenharmony_cidebug
4613498266Sopenharmony_ci</features>
4713498266Sopenharmony_ci<setenv>
4813498266Sopenharmony_ciCURL_ISATTY=yes
4913498266Sopenharmony_ci</setenv>
5013498266Sopenharmony_ci<name>
5113498266Sopenharmony_ciRefuse binary output to terminal
5213498266Sopenharmony_ci</name>
5313498266Sopenharmony_ci<command>
5413498266Sopenharmony_cihttp://%HOSTIP:%HTTPPORT/%TESTNUMBER
5513498266Sopenharmony_ci</command>
5613498266Sopenharmony_ci</client>
5713498266Sopenharmony_ci
5813498266Sopenharmony_ci#
5913498266Sopenharmony_ci# Verify data after the test has been "shot"
6013498266Sopenharmony_ci<verify>
6113498266Sopenharmony_ci<protocol>
6213498266Sopenharmony_ciGET /%TESTNUMBER HTTP/1.1
6313498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT
6413498266Sopenharmony_ciUser-Agent: curl/%VERSION
6513498266Sopenharmony_ciAccept: */*
6613498266Sopenharmony_ci
6713498266Sopenharmony_ci</protocol>
6813498266Sopenharmony_ci<stdout>
6913498266Sopenharmony_ciHTTP/1.1 200 OK
7013498266Sopenharmony_ciDate: Tue, 09 Nov 2010 14:49:00 GMT
7113498266Sopenharmony_ciServer: test-server/fake
7213498266Sopenharmony_ciLast-Modified: Tue, 13 Jun 2000 12:10:00 GMT
7313498266Sopenharmony_ciETag: 21025-dc7-39462498
7413498266Sopenharmony_ciAccept-Ranges: bytes
7513498266Sopenharmony_ciContent-Length: 5
7613498266Sopenharmony_ciConnection: close
7713498266Sopenharmony_ciContent-Type: text/html
7813498266Sopenharmony_ciFunny-head: yesyes
7913498266Sopenharmony_ci
8013498266Sopenharmony_ci</stdout>
8113498266Sopenharmony_ci# 23 == CURLE_WRITE_ERROR, curl wouldn't accept the binary output
8213498266Sopenharmony_ci<errorcode>
8313498266Sopenharmony_ci23
8413498266Sopenharmony_ci</errorcode>
8513498266Sopenharmony_ci</verify>
8613498266Sopenharmony_ci</testcase>
87