test1270 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 302 Captive Portal
  15. Server: ohlala/2000
  16. Date: Tue, 17 Dec 2019 13:08:30 GMT
  17. Cache-Control: no-cache,no-store,must-revalidate,post-check=0,pre-check=0
  18. Location: https://moo.moo.moo
  19. Content-Type: text/html; charset=utf-8
  20. X-Frame-Options: SAMEORIGIN
  21. Strict-Transport-Security: max-age=604800
  22. Content-Length: 0
  23. Connection: close
  24. </data>
  25. </reply>
  26. # Client-side
  27. <client>
  28. <server>
  29. http
  30. </server>
  31. <name>
  32. Basic 'redirect_url'
  33. </name>
  34. <command>
  35. http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w '%{redirect_url}\n' -s
  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. User-Agent: curl/%VERSION
  44. Accept: */*
  45. </protocol>
  46. <stdout>
  47. HTTP/1.1 302 Captive Portal
  48. Server: ohlala/2000
  49. Date: Tue, 17 Dec 2019 13:08:30 GMT
  50. Cache-Control: no-cache,no-store,must-revalidate,post-check=0,pre-check=0
  51. Location: https://moo.moo.moo
  52. Content-Type: text/html; charset=utf-8
  53. X-Frame-Options: SAMEORIGIN
  54. Strict-Transport-Security: max-age=604800
  55. Content-Length: 0
  56. Connection: close
  57. https://moo.moo.moo/
  58. </stdout>
  59. </verify>
  60. </testcase>