test3015 1.1 KB

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