test1089 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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: Thu, 09 Nov 2010 14:49:00 GMT
  16. Content-Length: 8
  17. Connection: close
  18. Content-Type: text/plain
  19. Location: ./10890001
  20. monster
  21. </data>
  22. <data1 nocheck="yes">
  23. HTTP/1.1 200 OK
  24. Date: Thu, 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/1089 -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. <strip>
  48. ^User-Agent:.*
  49. </strip>
  50. <protocol>
  51. GET /1089 HTTP/1.1
  52. Host: %HOSTIP:%HTTPPORT
  53. Accept: */*
  54. GET /10890001 HTTP/1.1
  55. Host: %HOSTIP:%HTTPPORT
  56. Accept: */*
  57. </protocol>
  58. <stdout>
  59. HTTP/1.1 302 OK swsbounce swsclose
  60. Date: Thu, 09 Nov 2010 14:49:00 GMT
  61. Content-Length: 8
  62. Connection: close
  63. Content-Type: text/plain
  64. Location: ./10890001
  65. HTTP/1.1 200 OK
  66. Date: Thu, 09 Nov 2010 14:49:00 GMT
  67. Content-Length: 15
  68. Connection: close
  69. Content-Type: text/plain; charset=us-ascii
  70. bigger monster
  71. 2
  72. 1
  73. 15
  74. http://%HOSTIP:%HTTPPORT/10890001
  75. text/plain; charset=us-ascii
  76. 200
  77. </stdout>
  78. </verify>
  79. </testcase>