test1080 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. redirect_url
  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/10800002.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. HTTP Location: on two URLs 'redirect_url' check
  28. </name>
  29. <command>
  30. http://%HOSTIP:%HTTPPORT/we/want/our/1080 http://%HOSTIP:%HTTPPORT/we/want/our/1080 -w '%{redirect_url}\n'
  31. </command>
  32. </client>
  33. # Verify data after the test has been "shot"
  34. <verify>
  35. <strip>
  36. ^User-Agent:.*
  37. </strip>
  38. <protocol>
  39. GET /we/want/our/1080 HTTP/1.1
  40. Host: %HOSTIP:%HTTPPORT
  41. Accept: */*
  42. GET /we/want/our/1080 HTTP/1.1
  43. Host: %HOSTIP:%HTTPPORT
  44. Accept: */*
  45. </protocol>
  46. <stdout>
  47. HTTP/1.1 301 This is a weirdo text message swsclose
  48. Location: data/10800002.txt?coolsite=yes
  49. Content-Length: 62
  50. Connection: close
  51. This server reply is for testing a simple Location: following
  52. http://%HOSTIP:%HTTPPORT/we/want/our/data/10800002.txt?coolsite=yes
  53. HTTP/1.1 301 This is a weirdo text message swsclose
  54. Location: data/10800002.txt?coolsite=yes
  55. Content-Length: 62
  56. Connection: close
  57. This server reply is for testing a simple Location: following
  58. http://%HOSTIP:%HTTPPORT/we/want/our/data/10800002.txt?coolsite=yes
  59. </stdout>
  60. </verify>
  61. </testcase>