test1081 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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/10810099.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 nocheck="yes">
  21. HTTP/1.1 200 Followed here fine swsclose
  22. Date: Thu, 09 Nov 2010 14:49:00 GMT
  23. Server: test-server/fake
  24. Content-Length: 41
  25. This second URL does not have a location
  26. </data2>
  27. </reply>
  28. # Client-side
  29. <client>
  30. <server>
  31. http
  32. </server>
  33. <name>
  34. HTTP no Location: on second URL 'redirect_url' check
  35. </name>
  36. <command>
  37. http://%HOSTIP:%HTTPPORT/we/want/our/1081 http://%HOSTIP:%HTTPPORT/we/want/our/10810002 -w '%{redirect_url}\n'
  38. </command>
  39. </client>
  40. # Verify data after the test has been "shot"
  41. <verify>
  42. <strip>
  43. ^User-Agent:.*
  44. </strip>
  45. <protocol>
  46. GET /we/want/our/1081 HTTP/1.1
  47. Host: %HOSTIP:%HTTPPORT
  48. Accept: */*
  49. GET /we/want/our/10810002 HTTP/1.1
  50. Host: %HOSTIP:%HTTPPORT
  51. Accept: */*
  52. </protocol>
  53. <stdout>
  54. HTTP/1.1 301 This is a weirdo text message swsclose
  55. Location: data/10810099.txt?coolsite=yes
  56. Content-Length: 62
  57. Connection: close
  58. This server reply is for testing a simple Location: following
  59. http://%HOSTIP:%HTTPPORT/we/want/our/data/10810099.txt?coolsite=yes
  60. HTTP/1.1 200 Followed here fine swsclose
  61. Date: Thu, 09 Nov 2010 14:49:00 GMT
  62. Server: test-server/fake
  63. Content-Length: 41
  64. This second URL does not have a location
  65. </stdout>
  66. </verify>
  67. </testcase>