test1056 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. followlocation
  7. IPv6
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 302 OK swsclose
  15. Location: http://[::1%259999]:8994/moo/10560002
  16. Date: Thu, 31 Jul 2008 14:49:00 GMT
  17. Connection: close
  18. </data>
  19. <data2>
  20. HTTP/1.1 200 OK swsclose
  21. Date: Thu, 31 Jul 2008 14:49:00 GMT
  22. Connection: close
  23. body
  24. </data2>
  25. <datacheck>
  26. HTTP/1.1 302 OK swsclose
  27. Location: http://[::1%259999]:8994/moo/10560002
  28. Date: Thu, 31 Jul 2008 14:49:00 GMT
  29. Connection: close
  30. HTTP/1.1 200 OK swsclose
  31. Date: Thu, 31 Jul 2008 14:49:00 GMT
  32. Connection: close
  33. body
  34. </datacheck>
  35. </reply>
  36. #
  37. # Client-side
  38. <client>
  39. <features>
  40. ipv6
  41. </features>
  42. <server>
  43. http
  44. http-ipv6
  45. </server>
  46. <name>
  47. HTTP follow redirect from IPv4 to IPv6 with scope
  48. </name>
  49. <command>
  50. http://%HOSTIP:%HTTPPORT/we/are/all/twits/1056 -L
  51. </command>
  52. # The data section doesn't do variable substitution, so we must assert this
  53. <precheck>
  54. perl -e "print 'Test requires default test server host and port' if ( '%HOST6IP' ne '[::1]' || '%HTTP6PORT' ne '8994' );"
  55. </precheck>
  56. </client>
  57. #
  58. # Verify data after the test has been "shot"
  59. <verify>
  60. <strip>
  61. ^User-Agent:.*
  62. </strip>
  63. <protocol>
  64. GET /we/are/all/twits/1056 HTTP/1.1
  65. Host: %HOSTIP:%HTTPPORT
  66. Accept: */*
  67. GET /moo/10560002 HTTP/1.1
  68. Host: %HOST6IP:%HTTP6PORT
  69. Accept: */*
  70. </protocol>
  71. </verify>
  72. </testcase>