test309 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTPS
  6. HTTP GET
  7. followlocation
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 301 This is a weirdo text message swsclose
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Location: https://%HOSTIP:%HTTPSPORT/data/%TESTNUMBER0002.txt?coolsite=yes
  17. Connection: close
  18. This server reply is for testing a simple Location: following to HTTPS URL
  19. </data>
  20. <data2>
  21. HTTP/1.1 200 Followed here fine swsclose
  22. Date: Tue, 09 Nov 2010 14:49:00 GMT
  23. Server: test-server/fake
  24. Content-Length: 52
  25. If this is received, the location following worked
  26. </data2>
  27. <datacheck>
  28. HTTP/1.1 301 This is a weirdo text message swsclose
  29. Date: Tue, 09 Nov 2010 14:49:00 GMT
  30. Server: test-server/fake
  31. Location: https://%HOSTIP:%HTTPSPORT/data/%TESTNUMBER0002.txt?coolsite=yes
  32. Connection: close
  33. HTTP/1.1 200 Followed here fine swsclose
  34. Date: Tue, 09 Nov 2010 14:49:00 GMT
  35. Server: test-server/fake
  36. Content-Length: 52
  37. If this is received, the location following worked
  38. </datacheck>
  39. </reply>
  40. # Client-side
  41. <client>
  42. <features>
  43. SSL
  44. </features>
  45. <server>
  46. http
  47. https
  48. </server>
  49. <name>
  50. HTTP Location: redirect to HTTPS URL
  51. </name>
  52. <command>
  53. -k http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L
  54. </command>
  55. </client>
  56. # Verify data after the test has been "shot"
  57. <verify>
  58. <protocol>
  59. GET /want/%TESTNUMBER HTTP/1.1
  60. Host: %HOSTIP:%HTTPPORT
  61. User-Agent: curl/%VERSION
  62. Accept: */*
  63. GET /data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
  64. Host: %HOSTIP:%HTTPSPORT
  65. User-Agent: curl/%VERSION
  66. Accept: */*
  67. </protocol>
  68. </verify>
  69. </testcase>