test1448 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. IDN
  7. followlocation
  8. --resolve
  9. --write-out
  10. </keywords>
  11. </info>
  12. #
  13. # Server-side
  14. <reply>
  15. <data nocheck="yes">
  16. HTTP/1.1 302 OK swsbounce
  17. Date: Tue, 09 Nov 2010 14:49:00 GMT
  18. Content-Length: 9
  19. Content-Type: text/plain
  20. Location: http://åäö.se:%HTTPPORT/%TESTNUMBER0001
  21. redirect
  22. </data>
  23. <data1 nocheck="yes">
  24. HTTP/1.1 200 OK
  25. Date: Tue, 09 Nov 2010 14:49:00 GMT
  26. Content-Length: 3
  27. Content-Type: text/plain; charset=us-ascii
  28. OK
  29. </data1>
  30. </reply>
  31. #
  32. # Client-side
  33. <client>
  34. <server>
  35. http
  36. </server>
  37. <features>
  38. idn
  39. </features>
  40. <setenv>
  41. LC_ALL=en_US.UTF-8
  42. LC_CTYPE=en_US.UTF-8
  43. </setenv>
  44. <precheck>
  45. perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
  46. </precheck>
  47. <name>
  48. Redirect following to UTF-8 IDN host name
  49. </name>
  50. <command>
  51. http://åäö.se:%HTTPPORT/%TESTNUMBER --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -L --connect-to %HOSTIP:%HTTPPORT:%HOSTIP:%HTTPPORT
  52. </command>
  53. </client>
  54. #
  55. # Verify data after the test has been "shot"
  56. <verify>
  57. <protocol>
  58. GET /%TESTNUMBER HTTP/1.1
  59. Host: xn--4cab6c.se:%HTTPPORT
  60. User-Agent: curl/%VERSION
  61. Accept: */*
  62. GET /%TESTNUMBER0001 HTTP/1.1
  63. Host: xn--4cab6c.se:%HTTPPORT
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. </protocol>
  67. <stdout>
  68. HTTP/1.1 302 OK swsbounce
  69. Date: Tue, 09 Nov 2010 14:49:00 GMT
  70. Content-Length: 9
  71. Content-Type: text/plain
  72. Location: http://åäö.se:%HTTPPORT/%TESTNUMBER0001
  73. HTTP/1.1 200 OK
  74. Date: Tue, 09 Nov 2010 14:49:00 GMT
  75. Content-Length: 3
  76. Content-Type: text/plain; charset=us-ascii
  77. OK
  78. </stdout>
  79. </verify>
  80. </testcase>