2
0

test1090 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 swsbounce swsclose
  16. Date: Thu, 09 Nov 2010 14:49:00 GMT
  17. Content-Length: 8
  18. Connection: close
  19. Content-Type: text/plain
  20. Location: ./10900001
  21. monster
  22. </data>
  23. <data1 nocheck="yes">
  24. HTTP/1.1 200 OK
  25. Date: Thu, 09 Nov 2010 14:49: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 --write-out with redirected fetch and chunked reply
  44. </name>
  45. <command>
  46. http://%HOSTIP:%HTTPPORT/1090 -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
  47. </command>
  48. </client>
  49. #
  50. # Verify data after the test has been "shot"
  51. <verify>
  52. <strip>
  53. ^User-Agent:.*
  54. </strip>
  55. <protocol>
  56. GET /1090 HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. Accept: */*
  59. GET /10900001 HTTP/1.1
  60. Host: %HOSTIP:%HTTPPORT
  61. Accept: */*
  62. </protocol>
  63. <stdout>
  64. HTTP/1.1 302 OK swsbounce swsclose
  65. Date: Thu, 09 Nov 2010 14:49:00 GMT
  66. Content-Length: 8
  67. Connection: close
  68. Content-Type: text/plain
  69. Location: ./10900001
  70. HTTP/1.1 200 OK
  71. Date: Thu, 09 Nov 2010 14:49:00 GMT
  72. Transfer-Encoding: chunked
  73. Connection: close
  74. Content-Type: text/plain; charset=us-ascii
  75. bigger monster
  76. 2
  77. 1
  78. 15
  79. http://%HOSTIP:%HTTPPORT/10900001
  80. text/plain; charset=us-ascii
  81. 200
  82. </stdout>
  83. </verify>
  84. </testcase>