test1671 (1367B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 -w 7 %header 8 </keywords> 9 </info> 10 11 # 12 # Server-side 13 <reply> 14 <data nocheck="yes"> 15 HTTP/1.1 200 OK 16 Date: Tue, 09 Nov 2010 14:49:00 GMT 17 Server: test-server/fake 18 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 19 ETag: "21025-dc7-39462498" 20 Accept-Ranges: bytes 21 Set-Cookie: firstcookie=want1; path=/ 22 Funny-head: yesyes 23 Set-Cookie: 2cookie=want2; path=/ 24 Content-Type: text/html 25 Set-Cookie: cookie3=want3; path=/ 26 Content-Length: 6 27 Connection: close 28 29 -foo- 30 </data> 31 </reply> 32 33 # 34 # Client-side 35 <client> 36 <features> 37 headers-api 38 </features> 39 <server> 40 http 41 </server> 42 <name> 43 -w header JSON output 44 </name> 45 <command option="no-output"> 46 http://%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> 54 GET /%TESTNUMBER HTTP/1.1 55 Host: %HOSTIP:%HTTPPORT 56 User-Agent: curl/%VERSION 57 Accept: */* 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>