From 6bde13a5316ef75eec695d96ce7deb1a6f3e2ce5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 13 Aug 2017 00:02:49 +0200 Subject: [PATCH] test1448: verify redirect to IDN using URL Closes #1772 --- tests/data/Makefile.inc | 2 +- tests/data/test1448 | 92 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1448 diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index f1e975eb2..1657ac67a 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -154,7 +154,7 @@ test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \ test1424 test1425 test1426 test1427 \ test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \ test1436 test1437 test1438 test1439 test1440 test1441 test1442 test1443 \ -test1444 test1445 test1446 test1447 test1450 test1451 \ +test1444 test1445 test1446 test1447 test1448 test1450 test1451 \ test1452 \ test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \ diff --git a/tests/data/test1448 b/tests/data/test1448 new file mode 100644 index 000000000..e04f47bde --- /dev/null +++ b/tests/data/test1448 @@ -0,0 +1,92 @@ + + + +HTTP +HTTP GET +IDN +followlocation +--write-out + + + +# +# Server-side + + +HTTP/1.1 302 OK swsbounce +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 9 +Content-Type: text/plain +Location: http://åäö.se:8990/14480001 + +redirect + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 3 +Content-Type: text/plain; charset=us-ascii + +OK + + + +# +# Client-side + + +http + + +idn + + +LC_ALL= +LC_CTYPE=en_US.UTF-8 + + +perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");' + + +Redirect following to UTF-8 IDN host name + + + +http://åäö.se:%HTTPPORT/1448 --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -L --connect-to %HOSTIP:8990:%HOSTIP:%HTTPPORT + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /1448 HTTP/1.1 +Host: xn--4cab6c.se:%HTTPPORT +Accept: */* + +GET /14480001 HTTP/1.1 +Host: xn--4cab6c.se:%HTTPPORT +Accept: */* + + + + +HTTP/1.1 302 OK swsbounce +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 9 +Content-Type: text/plain +Location: http://åäö.se:%HTTPPORT/14480001 + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 3 +Content-Type: text/plain; charset=us-ascii + +OK + + + +