test2047 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. IDN
  8. followlocation
  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: Thu, 09 Nov 2010 14:49:00 GMT
  18. Content-Length: 9
  19. Content-Type: text/plain
  20. Location: ./20470001
  21. redirect
  22. </data>
  23. <data1 nocheck="yes">
  24. HTTP/1.1 200 OK
  25. Date: Thu, 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=
  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. Connection re-use with IDN host name over HTTP proxy
  49. </name>
  50. <command>
  51. http://åäö.se/2047 -x %HOSTIP:%HTTPPORT -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
  52. </command>
  53. </client>
  54. #
  55. # Verify data after the test has been "shot"
  56. <verify>
  57. <strip>
  58. ^User-Agent:.*
  59. </strip>
  60. <protocol>
  61. GET http://xn--4cab6c.se/2047 HTTP/1.1
  62. Host: xn--4cab6c.se
  63. Accept: */*
  64. Proxy-Connection: Keep-Alive
  65. GET http://xn--4cab6c.se/20470001 HTTP/1.1
  66. Host: xn--4cab6c.se
  67. Accept: */*
  68. Proxy-Connection: Keep-Alive
  69. </protocol>
  70. <stdout>
  71. HTTP/1.1 302 OK swsbounce
  72. Date: Thu, 09 Nov 2010 14:49:00 GMT
  73. Content-Length: 9
  74. Content-Type: text/plain
  75. Location: ./20470001
  76. HTTP/1.1 200 OK
  77. Date: Thu, 09 Nov 2010 14:49:00 GMT
  78. Content-Length: 3
  79. Content-Type: text/plain; charset=us-ascii
  80. OK
  81. 1
  82. 1
  83. 3
  84. http://xn--4cab6c.se/20470001
  85. text/plain; charset=us-ascii
  86. 200
  87. </stdout>
  88. </verify>
  89. </testcase>