From 25d1064aeeab074a0c4f25cf00ccb67be09683cd Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 2 Aug 2015 19:39:05 +0200 Subject: [PATCH] Add some more rfc6266 tests. --- tests/browser/http/test_content_disposition.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/browser/http/test_content_disposition.py b/tests/browser/http/test_content_disposition.py index ff5790b69..09dc1f828 100644 --- a/tests/browser/http/test_content_disposition.py +++ b/tests/browser/http/test_content_disposition.py @@ -83,6 +83,23 @@ def test_att_double_space(header_checker): 'foo bar.html') +def test_iso2231_langtag(header_checker): + """'attachment', specifying a filename of foo-ä.html with language tag. + + Using RFC2231/5987 encoded ISO-8859-1. + UA should offer to download the resource as "foo-ä.html". + """ + header_checker.check_filename( + "attachment; filename*=iso-8859-1'de'foo-%E4.html", + 'foo-ä.html') + + +def test_iso2231_iso8859_invalid_chars(header_checker): + """'attachment', specifying a filename with invalid ISO-8859-1 chars.""" + header_checker.check_ignored( + "attachment; filename*=iso-8859-1''foo-%80.html") + + # All following test cases are based on http://greenbytes.de/tech/tc2231/