Return to test8 CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data |
1.1 ! misho 1: <testcase> ! 2: <info> ! 3: <keywords> ! 4: HTTP ! 5: HTTP GET ! 6: cookies ! 7: </keywords> ! 8: </info> ! 9: # Server-side ! 10: <reply> ! 11: <data> ! 12: HTTP/1.1 200 OK swsclose ! 13: Date: Thu, 09 Nov 2010 14:49:00 GMT ! 14: Server: test-server/fake ! 15: ! 16: </data> ! 17: </reply> ! 18: ! 19: # Client-side ! 20: <client> ! 21: <server> ! 22: http ! 23: </server> ! 24: <name> ! 25: HTTP with cookie parsing from header file ! 26: </name> ! 27: <command> ! 28: http://%HOSTIP:%HTTPPORT/we/want/8 -b log/heads8.txt ! 29: </command> ! 30: ! 31: # We create this file before the command is invoked! ! 32: <file name="log/heads8.txt"> ! 33: HTTP/1.1 200 OK ! 34: Date: Thu, 09 Nov 2010 14:49:00 GMT ! 35: Server: test-server/fake ! 36: Content-Type: text/html ! 37: Funny-head: yesyes ! 38: Set-Cookie: foobar=name; domain=%HOSTIP; path=/; ! 39: Set-Cookie: mismatch=this; domain=%HOSTIP; path="/silly/"; ! 40: Set-Cookie: partmatch=present; domain=.0.0.1; path=/w; ! 41: Set-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey; ! 42: Set-Cookie: cookie=yes; path=/we; ! 43: Set-Cookie: cookie=perhaps; path=/we/want; ! 44: Set-Cookie: name with space=is weird but; path=/we/want; ! 45: Set-Cookie: trailingspace = removed; path=/we/want; ! 46: Set-Cookie: nocookie=yes; path=/WE; ! 47: Set-Cookie: blexp=yesyes; domain=%HOSTIP; domain=%HOSTIP; expiry=totally bad; ! 48: Set-Cookie: partialip=nono; domain=.0.0.1; ! 49: ! 50: </file> ! 51: <precheck> ! 52: perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}' ! 53: </precheck> ! 54: </client> ! 55: ! 56: # Verify data after the test has been "shot" ! 57: <verify> ! 58: <strip> ! 59: ^User-Agent:.* ! 60: </strip> ! 61: <protocol> ! 62: GET /we/want/8 HTTP/1.1 ! 63: Host: %HOSTIP:%HTTPPORT ! 64: Accept: */* ! 65: Cookie: name with space=is weird but; trailingspace=removed; cookie=perhaps; cookie=yes; foobar=name; blexp=yesyes ! 66: ! 67: </protocol> ! 68: </verify> ! 69: </testcase>