test1325 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # http://greenbytes.de/tech/webdav/draft-reschke-http-status-308-latest.html
  2. <testcase>
  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: 13250002
  17. Date: Thu, 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: Thu, 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: 13250002
  30. Date: Thu, 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: Thu, 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/1325 -L -d "moo"
  50. </command>
  51. </client>
  52. #
  53. # Verify data after the test has been "shot"
  54. <verify>
  55. <strip>
  56. ^User-Agent:.*
  57. </strip>
  58. <protocol nonewline="yes">
  59. POST /we/1325 HTTP/1.1
  60. Host: %HOSTIP:%HTTPPORT
  61. Accept: */*
  62. Content-Length: 3
  63. Content-Type: application/x-www-form-urlencoded
  64. mooPOST /we/13250002 HTTP/1.1
  65. Host: %HOSTIP:%HTTPPORT
  66. Accept: */*
  67. Content-Length: 3
  68. Content-Type: application/x-www-form-urlencoded
  69. moo
  70. </protocol>
  71. </verify>
  72. </testcase>