1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6-w 7%header 8</keywords> 9</info> 10 11# 12# Server-side 13<reply> 14<data nocheck="yes"> 15HTTP/1.1 200 OK 16Date: Tue, 09 Nov 2010 14:49:00 GMT 17Server: test-server/fake 18Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 19ETag: "21025-dc7-39462498" 20Accept-Ranges: bytes 21Set-Cookie: firstcookie=want1; path=/ 22Funny-head: yesyes 23Set-Cookie: 2cookie=want2; path=/ 24Content-Type: text/html 25Set-Cookie: cookie3=want3; path=/ 26Content-Length: 6 27Connection: close 28 29-foo- 30</data> 31</reply> 32 33# 34# Client-side 35<client> 36<features> 37headers-api 38</features> 39<server> 40http 41</server> 42<name> 43-w header JSON output 44</name> 45<command option="no-output"> 46http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w '%{header_json}\n' -o %LOGDIR/%TESTNUMBER.out 47</command> 48</client> 49 50# 51# Verify data after the test has been "shot" 52<verify> 53<protocol> 54GET /%TESTNUMBER HTTP/1.1 55Host: %HOSTIP:%HTTPPORT 56User-Agent: curl/%VERSION 57Accept: */* 58 59</protocol> 60<stdout mode="text"> 61{"date":["Tue, 09 Nov 2010 14:49:00 GMT"], 62"server":["test-server/fake"], 63"last-modified":["Tue, 13 Jun 2000 12:10:00 GMT"], 64"etag":["\"21025-dc7-39462498\""], 65"accept-ranges":["bytes"], 66"set-cookie":["firstcookie=want1; path=/","2cookie=want2; path=/","cookie3=want3; path=/"], 67"funny-head":["yesyes"], 68"content-type":["text/html"], 69"content-length":["6"], 70"connection":["close"] 71} 72</stdout> 73</verify> 74</testcase> 75