test2081 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. </reply>
  21. # Client-side
  22. <client>
  23. <server>
  24. http
  25. </server>
  26. <name>
  27. Automatic referrer credential and anchor stripping check
  28. </name>
  29. <command>
  30. http://user:pass@%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER#anchor --location --referer ';auto' --write-out '%{referer}\n'
  31. </command>
  32. </client>
  33. # Verify data after the test has been "shot"
  34. <verify>
  35. <errorcode>
  36. 52
  37. </errorcode>
  38. <protocol>
  39. GET /we/want/our/%TESTNUMBER HTTP/1.1
  40. Host: %HOSTIP:%HTTPPORT
  41. Authorization: Basic dXNlcjpwYXNz
  42. User-Agent: curl/%VERSION
  43. Accept: */*
  44. GET /we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
  45. Host: %HOSTIP:%HTTPPORT
  46. Authorization: Basic dXNlcjpwYXNz
  47. User-Agent: curl/%VERSION
  48. Accept: */*
  49. Referer: http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER
  50. </protocol>
  51. <stdout>
  52. HTTP/1.1 301 This is a weirdo text message swsclose
  53. Location: data/%TESTNUMBER0002.txt?coolsite=yes
  54. Content-Length: 62
  55. Connection: close
  56. http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER
  57. </stdout>
  58. </verify>
  59. </testcase>