test2046 1.5 KB

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