Return to test506 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: shared cookies ! 8: </keywords> ! 9: </info> ! 10: ! 11: # Server-side ! 12: <reply> ! 13: <data1> ! 14: HTTP/1.1 200 OK ! 15: Date: Thu, 09 Nov 2010 14:49:00 GMT ! 16: Server: test-server/fake ! 17: Content-Type: text/html ! 18: Set-Cookie: test1=one; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 ! 19: Set-Cookie: test2=two; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 ! 20: Set-Cookie: test3=three; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 ! 21: Content-Length: 29 ! 22: ! 23: run 1: set cookie 1, 2 and 3 ! 24: </data1> ! 25: <data2> ! 26: HTTP/1.1 200 OK ! 27: Date: Thu, 09 Nov 2010 14:49:01 GMT ! 28: Server: test-server/fake ! 29: Content-Type: text/html ! 30: Set-Cookie: test4=four; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 ! 31: Set-Cookie: test5=five; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 ! 32: Content-Length: 26 ! 33: ! 34: run 2: set cookie 4 and 5 ! 35: </data2> ! 36: <data3> ! 37: HTTP/1.1 200 OK ! 38: Date: Thu, 09 Nov 2010 14:49:02 GMT ! 39: Server: test-server/fake ! 40: Content-Type: text/html ! 41: Funny-head: yesyes ! 42: Set-Cookie: test4=overwritten4; domain=host.foo.com; expires=Sat May 5 GMT 11:56:27 2035 ! 43: Set-Cookie: test1=overwritten1; domain=foo.com; expires=Thu Mar 3 GMT 11:56:27 2033 ! 44: Set-Cookie: test6=six; domain=.www.host.foo.com; expires=Thu Mar 3 GMT 11:56:27 2033 ! 45: Set-Cookie: test6=six_more; expires=Thu Mar 3 GMT 11:56:27 2033 ! 46: Content-Type: text/html ! 47: Content-Length: 73 ! 48: ! 49: run 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch ! 50: </data3> ! 51: </reply> ! 52: ! 53: # Client-side ! 54: <client> ! 55: <server> ! 56: http ! 57: </server> ! 58: # don't run this with the threaded-resolver since the events might trigger in ! 59: # a different order! ! 60: <features> ! 61: !threaded-resolver ! 62: </features> ! 63: <name> ! 64: HTTP with shared cookie list (and dns cache) ! 65: </name> ! 66: # Explicitly set the time zone to a known good one, in case the user is ! 67: # using one of the 'right' zones that take into account leap seconds ! 68: # which causes the cookie expiry times to be different. ! 69: <setenv> ! 70: TZ=GMT ! 71: </setenv> ! 72: <tool> ! 73: lib506 ! 74: </tool> ! 75: <command> ! 76: http://%HOSTIP:%HTTPPORT/506 ! 77: </command> ! 78: </client> ! 79: ! 80: # Verify data after the test has been "shot" ! 81: <verify> ! 82: <stdout> ! 83: GLOBAL_INIT ! 84: SHARE_INIT ! 85: CURLSHOPT_LOCKFUNC ! 86: CURLSHOPT_UNLOCKFUNC ! 87: CURLSHOPT_USERDATA ! 88: CURL_LOCK_DATA_COOKIE ! 89: CURL_LOCK_DATA_DNS ! 90: CURLOPT_SHARE ! 91: lock: share [Pigs in space]: 0 ! 92: unlock: share [Pigs in space]: 1 ! 93: CURLOPT_COOKIELIST injected_and_clobbered ! 94: lock: cookie [Pigs in space]: 2 ! 95: unlock: cookie [Pigs in space]: 3 ! 96: CURLOPT_COOKIELIST ALL ! 97: lock: cookie [Pigs in space]: 4 ! 98: unlock: cookie [Pigs in space]: 5 ! 99: CURLOPT_COOKIELIST session ! 100: lock: cookie [Pigs in space]: 6 ! 101: unlock: cookie [Pigs in space]: 7 ! 102: CURLOPT_COOKIELIST injected ! 103: lock: cookie [Pigs in space]: 8 ! 104: unlock: cookie [Pigs in space]: 9 ! 105: CURLOPT_COOKIELIST SESS ! 106: lock: cookie [Pigs in space]: 10 ! 107: unlock: cookie [Pigs in space]: 11 ! 108: CLEANUP ! 109: lock: cookie [Pigs in space]: 12 ! 110: unlock: cookie [Pigs in space]: 13 ! 111: lock: share [Pigs in space]: 14 ! 112: unlock: share [Pigs in space]: 15 ! 113: *** run 1 ! 114: CURLOPT_SHARE ! 115: lock: share [Pigs in space]: 16 ! 116: unlock: share [Pigs in space]: 17 ! 117: PERFORM ! 118: lock: cookie [Pigs in space]: 18 ! 119: unlock: cookie [Pigs in space]: 19 ! 120: lock: dns [Pigs in space]: 20 ! 121: unlock: dns [Pigs in space]: 21 ! 122: lock: dns [Pigs in space]: 22 ! 123: unlock: dns [Pigs in space]: 23 ! 124: lock: cookie [Pigs in space]: 24 ! 125: unlock: cookie [Pigs in space]: 25 ! 126: lock: cookie [Pigs in space]: 26 ! 127: unlock: cookie [Pigs in space]: 27 ! 128: lock: cookie [Pigs in space]: 28 ! 129: unlock: cookie [Pigs in space]: 29 ! 130: lock: cookie [Pigs in space]: 30 ! 131: unlock: cookie [Pigs in space]: 31 ! 132: run 1: set cookie 1, 2 and 3 ! 133: lock: dns [Pigs in space]: 32 ! 134: unlock: dns [Pigs in space]: 33 ! 135: lock: dns [Pigs in space]: 34 ! 136: unlock: dns [Pigs in space]: 35 ! 137: CLEANUP ! 138: lock: cookie [Pigs in space]: 36 ! 139: unlock: cookie [Pigs in space]: 37 ! 140: lock: share [Pigs in space]: 38 ! 141: unlock: share [Pigs in space]: 39 ! 142: *** run 2 ! 143: CURLOPT_SHARE ! 144: lock: share [Pigs in space]: 40 ! 145: unlock: share [Pigs in space]: 41 ! 146: PERFORM ! 147: lock: cookie [Pigs in space]: 42 ! 148: unlock: cookie [Pigs in space]: 43 ! 149: lock: dns [Pigs in space]: 44 ! 150: unlock: dns [Pigs in space]: 45 ! 151: lock: cookie [Pigs in space]: 46 ! 152: unlock: cookie [Pigs in space]: 47 ! 153: lock: cookie [Pigs in space]: 48 ! 154: unlock: cookie [Pigs in space]: 49 ! 155: lock: cookie [Pigs in space]: 50 ! 156: unlock: cookie [Pigs in space]: 51 ! 157: run 2: set cookie 4 and 5 ! 158: lock: dns [Pigs in space]: 52 ! 159: unlock: dns [Pigs in space]: 53 ! 160: lock: dns [Pigs in space]: 54 ! 161: unlock: dns [Pigs in space]: 55 ! 162: CLEANUP ! 163: lock: cookie [Pigs in space]: 56 ! 164: unlock: cookie [Pigs in space]: 57 ! 165: lock: share [Pigs in space]: 58 ! 166: unlock: share [Pigs in space]: 59 ! 167: *** run 3 ! 168: CURLOPT_SHARE ! 169: lock: share [Pigs in space]: 60 ! 170: unlock: share [Pigs in space]: 61 ! 171: CURLOPT_COOKIEJAR ! 172: CURLOPT_COOKIELIST FLUSH ! 173: lock: cookie [Pigs in space]: 62 ! 174: unlock: cookie [Pigs in space]: 63 ! 175: PERFORM ! 176: lock: dns [Pigs in space]: 64 ! 177: unlock: dns [Pigs in space]: 65 ! 178: lock: cookie [Pigs in space]: 66 ! 179: unlock: cookie [Pigs in space]: 67 ! 180: lock: cookie [Pigs in space]: 68 ! 181: unlock: cookie [Pigs in space]: 69 ! 182: lock: cookie [Pigs in space]: 70 ! 183: unlock: cookie [Pigs in space]: 71 ! 184: lock: cookie [Pigs in space]: 72 ! 185: unlock: cookie [Pigs in space]: 73 ! 186: lock: cookie [Pigs in space]: 74 ! 187: unlock: cookie [Pigs in space]: 75 ! 188: run 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch ! 189: lock: dns [Pigs in space]: 76 ! 190: unlock: dns [Pigs in space]: 77 ! 191: lock: dns [Pigs in space]: 78 ! 192: unlock: dns [Pigs in space]: 79 ! 193: CLEANUP ! 194: lock: cookie [Pigs in space]: 80 ! 195: unlock: cookie [Pigs in space]: 81 ! 196: lock: share [Pigs in space]: 82 ! 197: unlock: share [Pigs in space]: 83 ! 198: CURLOPT_SHARE ! 199: lock: share [Pigs in space]: 84 ! 200: unlock: share [Pigs in space]: 85 ! 201: CURLOPT_COOKIELIST ALL ! 202: lock: cookie [Pigs in space]: 86 ! 203: unlock: cookie [Pigs in space]: 87 ! 204: CURLOPT_COOKIEJAR ! 205: CURLOPT_COOKIELIST RELOAD ! 206: lock: cookie [Pigs in space]: 88 ! 207: unlock: cookie [Pigs in space]: 89 ! 208: lock: cookie [Pigs in space]: 90 ! 209: unlock: cookie [Pigs in space]: 91 ! 210: loaded cookies: ! 211: ----------------- ! 212: www.host.foo.com FALSE / FALSE 1993463787 test6 six_more ! 213: .www.host.foo.com TRUE / FALSE 1993463787 test6 six ! 214: .host.foo.com TRUE / FALSE 1896263787 test5 five ! 215: .host.foo.com TRUE / FALSE 2061978987 test4 overwritten4 ! 216: .foo.com TRUE / FALSE 1896263787 test3 three ! 217: .host.foo.com TRUE / FALSE 1896263787 test2 two ! 218: .foo.com TRUE / FALSE 1993463787 test1 overwritten1 ! 219: .host.foo.com TRUE / FALSE 1896263787 injected yes ! 220: ----------------- ! 221: try SHARE_CLEANUP... ! 222: lock: share [Pigs in space]: 92 ! 223: unlock: share [Pigs in space]: 93 ! 224: SHARE_CLEANUP failed, correct ! 225: CLEANUP ! 226: lock: cookie [Pigs in space]: 94 ! 227: unlock: cookie [Pigs in space]: 95 ! 228: lock: share [Pigs in space]: 96 ! 229: unlock: share [Pigs in space]: 97 ! 230: SHARE_CLEANUP ! 231: lock: share [Pigs in space]: 98 ! 232: unlock: share [Pigs in space]: 99 ! 233: GLOBAL_CLEANUP ! 234: </stdout> ! 235: <file name="log/jar506" mode="text"> ! 236: # Netscape HTTP Cookie File ! 237: # https://curl.haxx.se/docs/http-cookies.html ! 238: # This file was generated by libcurl! Edit at your own risk. ! 239: ! 240: www.host.foo.com FALSE / FALSE 1993463787 test6 six_more ! 241: .www.host.foo.com TRUE / FALSE 1993463787 test6 six ! 242: .host.foo.com TRUE / FALSE 1896263787 test5 five ! 243: .host.foo.com TRUE / FALSE 2061978987 test4 overwritten4 ! 244: .foo.com TRUE / FALSE 1896263787 test3 three ! 245: .host.foo.com TRUE / FALSE 1896263787 test2 two ! 246: .foo.com TRUE / FALSE 1993463787 test1 overwritten1 ! 247: .host.foo.com TRUE / FALSE 1896263787 injected yes ! 248: </file> ! 249: </verify> ! 250: </testcase>