test1089 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. Content-Type: text/plain
  19. Location: ./%TESTNUMBER0001
  20. monster
  21. </data>
  22. <data1 nocheck="yes">
  23. HTTP/1.1 200 OK
  24. Date: Tue, 09 Nov 2010 14:49:00 GMT
  25. Content-Length: 15
  26. Connection: close
  27. Content-Type: text/plain; charset=us-ascii
  28. bigger monster
  29. </data1>
  30. </reply>
  31. #
  32. # Client-side
  33. <client>
  34. <server>
  35. http
  36. </server>
  37. <name>
  38. HTTP GET --write-out with redirected fetch
  39. </name>
  40. <command>
  41. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
  42. </command>
  43. </client>
  44. #
  45. # Verify data after the test has been "shot"
  46. <verify>
  47. <protocol>
  48. GET /%TESTNUMBER HTTP/1.1
  49. Host: %HOSTIP:%HTTPPORT
  50. User-Agent: curl/%VERSION
  51. Accept: */*
  52. GET /%TESTNUMBER0001 HTTP/1.1
  53. Host: %HOSTIP:%HTTPPORT
  54. User-Agent: curl/%VERSION
  55. Accept: */*
  56. </protocol>
  57. <stdout>
  58. HTTP/1.1 302 OK swsbounce swsclose
  59. Date: Tue, 09 Nov 2010 14:49:00 GMT
  60. Content-Length: 8
  61. Connection: close
  62. Content-Type: text/plain
  63. Location: ./%TESTNUMBER0001
  64. HTTP/1.1 200 OK
  65. Date: Tue, 09 Nov 2010 14:49:00 GMT
  66. Content-Length: 15
  67. Connection: close
  68. Content-Type: text/plain; charset=us-ascii
  69. bigger monster
  70. 2
  71. 1
  72. 15
  73. http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
  74. text/plain; charset=us-ascii
  75. 200
  76. </stdout>
  77. </verify>
  78. </testcase>