]> granicus.if.org Git - curl/commitdiff
test1448: verify redirect to IDN using URL
authorDaniel Stenberg <daniel@haxx.se>
Sat, 12 Aug 2017 22:02:49 +0000 (00:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 12 Aug 2017 22:04:27 +0000 (00:04 +0200)
Closes #1772

tests/data/Makefile.inc
tests/data/test1448 [new file with mode: 0644]

index f1e975eb2bc5e4309394636bfe9bd7ac36c6ff56..1657ac67ae4e6f182c9715f76385a4860a77bb0c 100644 (file)
@@ -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 (file)
index 0000000..e04f47b
--- /dev/null
@@ -0,0 +1,92 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+IDN
+followlocation
+--write-out
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+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
+</data>
+<data1 nocheck="yes">
+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
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+idn
+</features>
+<setenv>
+LC_ALL=
+LC_CTYPE=en_US.UTF-8
+</setenv>
+<precheck>
+perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
+</precheck>
+ <name>
+Redirect following to UTF-8 IDN host name
+ </name>
+
+ <command>
+http://åäö.se:%HTTPPORT/1448 --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -L --connect-to %HOSTIP:8990:%HOSTIP:%HTTPPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1448 HTTP/1.1\r
+Host: xn--4cab6c.se:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /14480001 HTTP/1.1\r
+Host: xn--4cab6c.se:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<stdout>
+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
+</stdout>
+
+</verify>
+</testcase>