1<testcase> 2<info> 3<keywords> 4HTTP 5binary-stdout 6</keywords> 7</info> 8 9<reply> 10<real_data> 11HTTP/1.1 200 OK 12Date: Thu, 09 Nov 2010 14:49:00 GMT 13Server: test-server/fake 14Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 15ETag: 21025-dc7-39462498 16Accept-Ranges: bytes 17Content-Length: 5 18Connection: close 19Content-Type: text/html 20Funny-head: yesyes 21 221234 23</real_data> 24 25# Provided as base64 encoded to get the binary zero in the body treated 26# properly. Tricky to generate correctly. 27<data base64="yes" nocheck="yes"> 28SFRUUC8xLjEgMjAwIE9LCkRhdGU6IFRodSwgMDkgTm92IDIwMTAgMTQ6NDk6MDAgR01UClNlcnZl 29cjogdGVzdC1zZXJ2ZXIvZmFrZQpMYXN0LU1vZGlmaWVkOiBUdWUsIDEzIEp1biAyMDAwIDEyOjEw 30OjAwIEdNVApFVGFnOiAyMTAyNS1kYzctMzk0NjI0OTgKQWNjZXB0LVJhbmdlczogYnl0ZXMKQ29u 31dGVudC1MZW5ndGg6IDUKQ29ubmVjdGlvbjogY2xvc2UKQ29udGVudC1UeXBlOiB0ZXh0L2h0bWwK 32RnVubnktaGVhZDogeWVzeWVzCgoAMTIzNA== 33</data> 34</reply> 35 36# 37# Client-side 38<client> 39<server> 40http 41</server> 42 43# this test needs to be a debug build in order to fake it being a TTY output 44<features> 45debug 46</features> 47<setenv> 48CURL_ISATTY=yes 49</setenv> 50 <name> 51Refuse binary output to terminal 52 </name> 53 <command> 54http://%HOSTIP:%HTTPPORT/1425 55</command> 56</client> 57 58# 59# Verify data after the test has been "shot" 60<verify> 61<strip> 62^User-Agent:.* 63</strip> 64<protocol> 65GET /1425 HTTP/1.1 66Host: %HOSTIP:%HTTPPORT 67Accept: */* 68 69</protocol> 70<stdout> 71HTTP/1.1 200 OK 72Date: Thu, 09 Nov 2010 14:49:00 GMT 73Server: test-server/fake 74Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 75ETag: 21025-dc7-39462498 76Accept-Ranges: bytes 77Content-Length: 5 78Connection: close 79Content-Type: text/html 80Funny-head: yesyes 81 82</stdout> 83# 23 == CURLE_WRITE_ERROR, curl wouldn't accept the binary output 84<errorcode> 8523 86</errorcode> 87</verify> 88</testcase> 89