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