test1946 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <testcase>
  2. <info>
  3. <keywords>
  4. curl_easy_header
  5. </keywords>
  6. </info>
  7. # Server-side
  8. <reply>
  9. <data nocheck="yes">
  10. HTTP/1.1 302 OK
  11. Date: Thu, 01 Nov 2001 14:49:00 GMT
  12. Server: test with trailing space
  13. Content-Type: text/html
  14. Content-Length: 0
  15. Set-Cookie: onecookie=data;
  16. Set-Cookie: secondcookie=2data;
  17. Set-Cookie: cookie3=data3;
  18. Location: /%TESTNUMBER0002
  19. </data>
  20. <data2 nocheck="yes">
  21. HTTP/1.1 200 OK
  22. Date: Thu, 09 Nov 2010 14:49:00 GMT
  23. Server: the other one
  24. Content-Type: text/html
  25. Content-Length: 0
  26. Set-Cookie: 1cookie=data1;
  27. Set-Cookie: 2cookie=data2;
  28. </data2>
  29. </reply>
  30. # Client-side
  31. <client>
  32. <features>
  33. headers-api
  34. </features>
  35. <server>
  36. http
  37. </server>
  38. <name>
  39. curl_easy_header with redirect but get headers from first request
  40. </name>
  41. <tool>
  42. lib%TESTNUMBER
  43. </tool>
  44. <command>
  45. http://%HOSTIP:%HTTPPORT/%TESTNUMBER
  46. </command>
  47. </client>
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <stdout>
  51. Date == Thu, 01 Nov 2001 14:49:00 GMT
  52. Server == test with trailing space
  53. Content-Type == text/html
  54. Content-Length == 0
  55. Location == /19460002
  56. - Set-Cookie == onecookie=data; (0/3)
  57. - Set-Cookie == secondcookie=2data; (1/3)
  58. - Set-Cookie == cookie3=data3; (2/3)
  59. </stdout>
  60. </verify>
  61. </testcase>