test2047 1.7 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: Tue, 09 Nov 2010 14:49:00 GMT
  18. Content-Length: 9
  19. Content-Type: text/plain
  20. Location: ./%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. proxy
  40. </features>
  41. <setenv>
  42. LC_ALL=en_US.UTF-8
  43. LC_CTYPE=en_US.UTF-8
  44. </setenv>
  45. <precheck>
  46. perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
  47. </precheck>
  48. <name>
  49. Connection re-use with IDN host name over HTTP proxy
  50. </name>
  51. <command>
  52. http://åäö.se/%TESTNUMBER -x %HOSTIP:%HTTPPORT -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
  53. </command>
  54. </client>
  55. #
  56. # Verify data after the test has been "shot"
  57. <verify>
  58. <protocol>
  59. GET http://xn--4cab6c.se/%TESTNUMBER HTTP/1.1
  60. Host: xn--4cab6c.se
  61. User-Agent: curl/%VERSION
  62. Accept: */*
  63. Proxy-Connection: Keep-Alive
  64. GET http://xn--4cab6c.se/%TESTNUMBER0001 HTTP/1.1
  65. Host: xn--4cab6c.se
  66. User-Agent: curl/%VERSION
  67. Accept: */*
  68. Proxy-Connection: Keep-Alive
  69. </protocol>
  70. <stdout>
  71. HTTP/1.1 302 OK swsbounce
  72. Date: Tue, 09 Nov 2010 14:49:00 GMT
  73. Content-Length: 9
  74. Content-Type: text/plain
  75. Location: ./%TESTNUMBER0001
  76. HTTP/1.1 200 OK
  77. Date: Tue, 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://åäö.se/%TESTNUMBER0001
  85. text/plain; charset=us-ascii
  86. 200
  87. </stdout>
  88. </verify>
  89. </testcase>