test506 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # Server-side
  2. <reply>
  3. <data1>
  4. HTTP/1.1 200 OK
  5. Date: Thu, 09 Nov 2010 14:49:00 GMT
  6. Server: test-server/fake
  7. Content-Type: text/html
  8. Set-Cookie: test1=one; domain=foo.com; expires=Tue Feb 1 11:56:27 MET 2007
  9. Set-Cookie: test2=two; domain=host.foo.com; expires=Tue Feb 1 11:56:27 MET 2007
  10. Set-Cookie: test3=three; domain=foo.com; expires=Tue Feb 1 11:56:27 MET 2007
  11. Content-Length: 29
  12. run 1: set cookie 1, 2 and 3
  13. </data1>
  14. <data2>
  15. HTTP/1.1 200 OK
  16. Date: Thu, 09 Nov 2010 14:49:01 GMT
  17. Server: test-server/fake
  18. Content-Type: text/html
  19. Set-Cookie: test4=four; domain=host.foo.com; expires=Tue Feb 1 11:56:27 MET 2007
  20. Set-Cookie: test5=five; domain=host.foo.com; expires=Tue Feb 1 11:56:27 MET 2007
  21. Content-Length: 26
  22. run 2: set cookie 4 and 5
  23. </data2>
  24. <data3>
  25. HTTP/1.1 200 OK
  26. Date: Thu, 09 Nov 2010 14:49:02 GMT
  27. Server: test-server/fake
  28. Content-Type: text/html
  29. Funny-head: yesyes
  30. Set-Cookie: test4=overwritten4; domain=host.foo.com; expires=Thu Dec 31 23:59:59 MET 2009
  31. Set-Cookie: test1=overwritten1; domain=foo.com; expires=Tue Feb 2 11:56:27 MET 2007
  32. Content-Type: text/html
  33. Content-Length: 32
  34. run 3: overwrite cookie 1 and 4
  35. </data5>
  36. </reply>
  37. # Client-side
  38. <client>
  39. <server>
  40. http
  41. </server>
  42. <name>
  43. HTTP with shared cookie list (and dns cache)
  44. </name>
  45. <tool>
  46. lib506
  47. </tool>
  48. <command>
  49. http://%HOSTIP:%HOSTPORT/506
  50. </command>
  51. </client>
  52. # Verify data after the test has been "shot"
  53. <verify>
  54. <stdout>
  55. GLOBAL_INIT
  56. SHARE_INIT
  57. CURL_LOCK_DATA_COOKIE
  58. CURL_LOCK_DATA_DNS
  59. *** run 1
  60. CURLOPT_SHARE
  61. lock: share <Pigs in space>: 0
  62. unlock: share <Pigs in space>: 1
  63. PERFORM
  64. lock: dns <Pigs in space>: 2
  65. unlock: dns <Pigs in space>: 3
  66. lock: dns <Pigs in space>: 4
  67. unlock: dns <Pigs in space>: 5
  68. lock: cookie <Pigs in space>: 6
  69. unlock: cookie <Pigs in space>: 7
  70. lock: cookie <Pigs in space>: 8
  71. unlock: cookie <Pigs in space>: 9
  72. lock: cookie <Pigs in space>: 10
  73. unlock: cookie <Pigs in space>: 11
  74. lock: cookie <Pigs in space>: 12
  75. unlock: cookie <Pigs in space>: 13
  76. run 1: set cookie 1, 2 and 3
  77. lock: dns <Pigs in space>: 14
  78. unlock: dns <Pigs in space>: 15
  79. lock: dns <Pigs in space>: 16
  80. unlock: dns <Pigs in space>: 17
  81. CLEANUP
  82. lock: cookie <Pigs in space>: 18
  83. unlock: cookie <Pigs in space>: 19
  84. *** run 2
  85. CURLOPT_SHARE
  86. lock: share <Pigs in space>: 20
  87. unlock: share <Pigs in space>: 21
  88. PERFORM
  89. lock: dns <Pigs in space>: 22
  90. unlock: dns <Pigs in space>: 23
  91. lock: cookie <Pigs in space>: 24
  92. unlock: cookie <Pigs in space>: 25
  93. lock: cookie <Pigs in space>: 26
  94. unlock: cookie <Pigs in space>: 27
  95. lock: cookie <Pigs in space>: 28
  96. unlock: cookie <Pigs in space>: 29
  97. run 2: set cookie 4 and 5
  98. lock: dns <Pigs in space>: 30
  99. unlock: dns <Pigs in space>: 31
  100. lock: dns <Pigs in space>: 32
  101. unlock: dns <Pigs in space>: 33
  102. CLEANUP
  103. lock: cookie <Pigs in space>: 34
  104. unlock: cookie <Pigs in space>: 35
  105. *** run 3
  106. CURLOPT_SHARE
  107. lock: share <Pigs in space>: 36
  108. unlock: share <Pigs in space>: 37
  109. CURLOPT_COOKIEJAR
  110. PERFORM
  111. lock: dns <Pigs in space>: 38
  112. unlock: dns <Pigs in space>: 39
  113. lock: cookie <Pigs in space>: 40
  114. unlock: cookie <Pigs in space>: 41
  115. lock: cookie <Pigs in space>: 42
  116. unlock: cookie <Pigs in space>: 43
  117. lock: cookie <Pigs in space>: 44
  118. unlock: cookie <Pigs in space>: 45
  119. run 3: overwrite cookie 1 and 4
  120. lock: dns <Pigs in space>: 46
  121. unlock: dns <Pigs in space>: 47
  122. lock: dns <Pigs in space>: 48
  123. unlock: dns <Pigs in space>: 49
  124. try SHARE_CLEANUP...
  125. lock: share <Pigs in space>: 50
  126. unlock: share <Pigs in space>: 51
  127. SHARE_CLEANUP failed, correct
  128. CLEANUP
  129. lock: cookie <Pigs in space>: 52
  130. unlock: cookie <Pigs in space>: 53
  131. SHARE_CLEANUP
  132. lock: share <Pigs in space>: 54
  133. unlock: share <Pigs in space>: 55
  134. GLOBAL_CLEANUP
  135. </stdout>
  136. <stderr>
  137. http://%HOSTIP:%HOSTPORT/506
  138. </stderr>
  139. <file name="log/jar506">
  140. # Netscape HTTP Cookie File
  141. # http://www.netscape.com/newsref/std/cookie_spec.html
  142. # This file was generated by libcurl! Edit at your own risk.
  143. .foo.com TRUE / FALSE 1170413787 test1 overwritten1
  144. .host.foo.com TRUE / FALSE 1170327387 test2 two
  145. .foo.com TRUE / FALSE 1170327387 test3 three
  146. .host.foo.com TRUE / FALSE 1262300399 test4 overwritten4
  147. .host.foo.com TRUE / FALSE 1170327387 test5 five
  148. </file>
  149. </verify>