test1325 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <testcase>
  2. # https://greenbytes.de/tech/webdav/draft-reschke-http-status-308-latest.html
  3. <info>
  4. <keywords>
  5. HTTP
  6. HTTP GET
  7. 308
  8. followlocation
  9. </keywords>
  10. </info>
  11. #
  12. # Server-side
  13. <reply>
  14. <data>
  15. HTTP/1.1 308 OK swsclose
  16. Location: %TESTNUMBER0002
  17. Date: Tue, 09 Nov 2010 14:49:00 GMT
  18. Connection: close
  19. </data>
  20. <data2>
  21. HTTP/1.1 200 OK swsclose
  22. Location: this should be ignored
  23. Date: Tue, 09 Nov 2010 14:49:00 GMT
  24. Connection: close
  25. body
  26. </data2>
  27. <datacheck>
  28. HTTP/1.1 308 OK swsclose
  29. Location: %TESTNUMBER0002
  30. Date: Tue, 09 Nov 2010 14:49:00 GMT
  31. Connection: close
  32. HTTP/1.1 200 OK swsclose
  33. Location: this should be ignored
  34. Date: Tue, 09 Nov 2010 14:49:00 GMT
  35. Connection: close
  36. body
  37. </datacheck>
  38. </reply>
  39. #
  40. # Client-side
  41. <client>
  42. <server>
  43. http
  44. </server>
  45. <name>
  46. HTTP 308-redirect with POST
  47. </name>
  48. <command>
  49. http://%HOSTIP:%HTTPPORT/we/%TESTNUMBER -L -d "moo"
  50. </command>
  51. </client>
  52. #
  53. # Verify data after the test has been "shot"
  54. <verify>
  55. <protocol nonewline="yes">
  56. POST /we/%TESTNUMBER HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. User-Agent: curl/%VERSION
  59. Accept: */*
  60. Content-Length: 3
  61. Content-Type: application/x-www-form-urlencoded
  62. mooPOST /we/%TESTNUMBER0002 HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. Content-Length: 3
  67. Content-Type: application/x-www-form-urlencoded
  68. moo
  69. </protocol>
  70. </verify>
  71. </testcase>