test1197 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 POST redirected to GET and --write-out method
  39. </name>
  40. <command>
  41. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{method}\n" -L -d "twinkle twinkle little star"
  42. </command>
  43. </client>
  44. #
  45. # Verify data after the test has been "shot"
  46. <verify>
  47. <protocol>
  48. POST /%TESTNUMBER HTTP/1.1
  49. Host: %HOSTIP:%HTTPPORT
  50. User-Agent: curl/%VERSION
  51. Accept: */*
  52. Content-Length: 27
  53. Content-Type: application/x-www-form-urlencoded
  54. twinkle twinkle little starGET /%TESTNUMBER0001 HTTP/1.1
  55. Host: %HOSTIP:%HTTPPORT
  56. User-Agent: curl/%VERSION
  57. Accept: */*
  58. </protocol>
  59. <stdout>
  60. HTTP/1.1 302 OK swsbounce swsclose
  61. Date: Tue, 09 Nov 2010 14:49:00 GMT
  62. Content-Length: 8
  63. Connection: close
  64. Content-Type: text/plain
  65. Location: ./%TESTNUMBER0001
  66. HTTP/1.1 200 OK
  67. Date: Tue, 09 Nov 2010 14:49:00 GMT
  68. Content-Length: 15
  69. Connection: close
  70. Content-Type: text/plain; charset=us-ascii
  71. bigger monster
  72. GET
  73. </stdout>
  74. </verify>
  75. </testcase>