From 6bde13a5316ef75eec695d96ce7deb1a6f3e2ce5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 13 Aug 2017 00:02:49 +0200 Subject: test1448: verify redirect to IDN using URL Closes #1772 --- tests/data/test1448 | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 tests/data/test1448 (limited to 'tests/data/test1448') 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 + + + + -- cgit v1.2.3