test2081 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. referer
  7. followlocation
  8. --write-out
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <data nocheck="yes">
  14. HTTP/1.1 301 This is a weirdo text message swsclose
  15. Location: data/%TESTNUMBER0002.txt?coolsite=yes
  16. Content-Length: 62
  17. Connection: close
  18. This server reply is for testing a simple Location: following
  19. </data>
  20. <data2>
  21. HTTP/1.1 200 This is another weirdo text message swsclose
  22. Connection: close
  23. Thanks for following.
  24. </data2>
  25. </reply>
  26. # Client-side
  27. <client>
  28. <server>
  29. http
  30. </server>
  31. <name>
  32. Automatic referrer credential and anchor stripping check
  33. </name>
  34. <command>
  35. http://user:pass@%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER#anchor --location --referer ';auto' --write-out '%{referer}\n'
  36. </command>
  37. </client>
  38. # Verify data after the test has been "shot"
  39. <verify>
  40. <protocol>
  41. GET /we/want/our/%TESTNUMBER HTTP/1.1
  42. Host: %HOSTIP:%HTTPPORT
  43. Authorization: Basic dXNlcjpwYXNz
  44. User-Agent: curl/%VERSION
  45. Accept: */*
  46. GET /we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
  47. Host: %HOSTIP:%HTTPPORT
  48. Authorization: Basic dXNlcjpwYXNz
  49. User-Agent: curl/%VERSION
  50. Accept: */*
  51. Referer: http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER
  52. </protocol>
  53. <stdout>
  54. HTTP/1.1 301 This is a weirdo text message swsclose
  55. Location: data/%TESTNUMBER0002.txt?coolsite=yes
  56. Content-Length: 62
  57. Connection: close
  58. HTTP/1.1 200 This is another weirdo text message swsclose
  59. Connection: close
  60. Thanks for following.
  61. http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER
  62. </stdout>
  63. </verify>
  64. </testcase>