test193 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. followlocation
  7. --write-out
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <data nocheck="yes">
  14. HTTP/1.1 302 OK swsbounce swsclose
  15. Date: Tue, 09 Nov 2010 14:49:00 GMT
  16. Content-Length: 8
  17. Connection: close
  18. Location: ./%TESTNUMBER
  19. monster
  20. </data>
  21. <data1 nocheck="yes">
  22. HTTP/1.1 200 OK
  23. Date: Tue, 09 Nov 2010 14:49:00 GMT
  24. Content-Length: 8
  25. Connection: close
  26. monster
  27. </data1>
  28. </reply>
  29. #
  30. # Client-side
  31. <client>
  32. <server>
  33. http
  34. </server>
  35. <name>
  36. HTTP GET -w num_connects with redirected fetch (2 connects)
  37. </name>
  38. <command>
  39. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n" -L
  40. </command>
  41. </client>
  42. #
  43. # Verify data after the test has been "shot"
  44. <verify>
  45. <protocol>
  46. GET /%TESTNUMBER HTTP/1.1
  47. Host: %HOSTIP:%HTTPPORT
  48. User-Agent: curl/%VERSION
  49. Accept: */*
  50. GET /%TESTNUMBER HTTP/1.1
  51. Host: %HOSTIP:%HTTPPORT
  52. User-Agent: curl/%VERSION
  53. Accept: */*
  54. </protocol>
  55. <stdout>
  56. HTTP/1.1 302 OK swsbounce swsclose
  57. Date: Tue, 09 Nov 2010 14:49:00 GMT
  58. Content-Length: 8
  59. Connection: close
  60. Location: ./%TESTNUMBER
  61. HTTP/1.1 200 OK
  62. Date: Tue, 09 Nov 2010 14:49:00 GMT
  63. Content-Length: 8
  64. Connection: close
  65. monster
  66. 2
  67. </stdout>
  68. </verify>
  69. </testcase>