blob: 6c1beb671d402c832e502f144490dad635a826e8 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP proxy
7IDN
8FAILURE
9config file
10</keywords>
11</info>
12
13#
14# Server-side
15<reply>
16<data>
17HTTP/1.0 503 Service Unavailable
18Date: Thu, 09 Nov 2010 14:49:00 GMT
19Server: test-server/fake swsclose
20Content-Type: text/html
21Funny-head: yesyes
22
23</data>
24</reply>
25
26#
27# Client-side
28<client>
29<server>
30http
31</server>
32<features>
33idn
34</features>
35<setenv>
36LC_ALL=
37LC_CTYPE=en_US.UTF-8
38</setenv>
39<precheck>
40perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
41</precheck>
42 <name>
43HTTP over proxy with malformatted IDN host name
44 </name>
45
46# This host name contains an invalid UTF-8 byte sequence that can't be
47# converted into an IDN name
48<stdin>
49url = "http://invalid-utf8-â.local/page/1034"
50</stdin>
51 <command>
52-K - -x %HOSTIP:%HTTPPORT
53</command>
54</client>
55
56#
57# Verify data after the test has been "shot"
58<verify>
59<strip>
60^User-Agent:.*
61</strip>
62<protocol>
63GET http://invalid-utf8-â.local/page/1034 HTTP/1.1
64Host: invalid-utf8-â.local
65Accept: */*
66Proxy-Connection: Keep-Alive
67
68</protocol>
69</verify>
70</testcase>