test1524 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP PUT
  6. followlocation
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 303 OK swsclose
  14. Location: moo.html&testcase=/%TESTNUMBER0002
  15. Connection: close
  16. </data>
  17. <data2>
  18. HTTP/1.1 200 OK swsclose
  19. Location: this should be ignored
  20. Connection: close
  21. body
  22. </data2>
  23. <datacheck>
  24. HTTP/1.1 303 OK swsclose
  25. Location: moo.html&testcase=/%TESTNUMBER0002
  26. Connection: close
  27. HTTP/1.1 200 OK swsclose
  28. Location: this should be ignored
  29. Connection: close
  30. body
  31. </datacheck>
  32. </reply>
  33. #
  34. # Client-side
  35. <client>
  36. <server>
  37. http
  38. </server>
  39. <name>
  40. HTTP PUT with 303 redirect
  41. </name>
  42. <command>
  43. http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -T log/upload%TESTNUMBER.txt
  44. </command>
  45. <file name="log/upload%TESTNUMBER.txt">
  46. moo
  47. </file>
  48. </client>
  49. #
  50. # Verify data after the test has been "shot"
  51. <verify>
  52. <protocol nonewline="yes">
  53. PUT /blah/%TESTNUMBER HTTP/1.1
  54. Host: %HOSTIP:%HTTPPORT
  55. User-Agent: curl/%VERSION
  56. Accept: */*
  57. Content-Length: 4
  58. Expect: 100-continue
  59. moo
  60. GET /blah/moo.html&testcase=/%TESTNUMBER0002 HTTP/1.1
  61. Host: %HOSTIP:%HTTPPORT
  62. User-Agent: curl/%VERSION
  63. Accept: */*
  64. </protocol>
  65. </verify>
  66. </testcase>