7 # " Kon'nichiwa <dot> Japan
8 my $euc_jp_hostname = "\272\243\306\374\244\317.\306\374\313\334";
9 my $punycoded_hostname = 'xn--v9ju72g90p.xn--wgv71a';
11 ###############################################################################
13 my $starter_file = <<EOF;
14 <a href="http://$euc_jp_hostname/">The link</a>
17 my $result_file = <<EOF;
21 # code, msg, headers, content
23 'http://start-here.com/start.html' => {
25 msg => "You want fries with that?",
27 'Content-Type' => 'text/html; charset=EUC-JP',
29 content => $starter_file,
31 "http://$punycoded_hostname/index.html" => {
35 'Content-Type' => 'text/plain',
37 content => $result_file,
41 my $cmdline = $WgetTest::WGETPATH . " --debug --iri -rH"
42 . " -e http_proxy=localhost:{{port}} http://start-here.com/start.html";
44 my $expected_error_code = 0;
46 my %expected_downloaded_files = (
47 'start-here.com/start.html' => {
48 content => $starter_file,
50 "$punycoded_hostname/index.html" => {
51 content => $result_file,
55 ###############################################################################
57 my $the_test = HTTPTest->new (name => "Test-iri-headers",
60 errcode => $expected_error_code,
61 output => \%expected_downloaded_files);
62 exit $the_test->run();