test1080 1.5 KB

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