lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | HTTP proxy |
| 7 | IDN |
| 8 | FAILURE |
| 9 | config file |
| 10 | </keywords> |
| 11 | </info> |
| 12 | |
| 13 | # |
| 14 | # Server-side |
| 15 | <reply> |
| 16 | <data> |
| 17 | HTTP/1.0 503 Service Unavailable
|
| 18 | Date: Thu, 09 Nov 2010 14:49:00 GMT
|
| 19 | Server: test-server/fake swsclose
|
| 20 | Content-Type: text/html
|
| 21 | Funny-head: yesyes
|
| 22 |
|
| 23 | </data> |
| 24 | </reply> |
| 25 | |
| 26 | # |
| 27 | # Client-side |
| 28 | <client> |
| 29 | <server> |
| 30 | http |
| 31 | </server> |
| 32 | <features> |
| 33 | idn |
| 34 | </features> |
| 35 | <setenv> |
| 36 | LC_ALL= |
| 37 | LC_CTYPE=en_US.UTF-8 |
| 38 | </setenv> |
| 39 | <precheck> |
| 40 | perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");' |
| 41 | </precheck> |
| 42 | <name> |
| 43 | HTTP 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> |
| 49 | url = "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> |
| 63 | GET http://invalid-utf8-â.local/page/1034 HTTP/1.1
|
| 64 | Host: invalid-utf8-â.local
|
| 65 | Accept: */*
|
| 66 | Proxy-Connection: Keep-Alive
|
| 67 |
|
| 68 | </protocol> |
| 69 | </verify> |
| 70 | </testcase> |