aboutsummaryrefslogtreecommitdiff
path: root/test/unit/disposition.c
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2025-05-01 00:37:57 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2025-05-01 00:56:42 +0200
commit5972678db845fe1f95214d72e0732d2a5128ef01 (patch)
treea4a13b5d5b5f1a94f0700c2e01cd5b7d19c2c029 /test/unit/disposition.c
parenta528102473e6161cc71767512acff5c39b0c75b9 (diff)
Allow whitespaces before separator
Diffstat (limited to 'test/unit/disposition.c')
-rw-r--r--test/unit/disposition.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/disposition.c b/test/unit/disposition.c
index 47e2f4eb..92de9181 100644
--- a/test/unit/disposition.c
+++ b/test/unit/disposition.c
@@ -35,9 +35,20 @@ struct testcase cases[] = {
{ "attachment; filename=\"foo", "attachment", NULL },
{ "attachment; filename= ", "attachment", NULL },
{ "attachment; filename=\"", "attachment", NULL },
+ { "attachment; filename=\"\"", "attachment", NULL },
+ { "attachment; filename=\"a\"", "attachment", "a" },
{ "attachment; filename=\"foo", "attachment", NULL },
{ "attachment; filename=~/foo", "attachment", "__foo" },
+ /* Note that due to the rules for implied linear whitespace (Section 2.1 of
+ * [RFC2616]), OPTIONAL whitespace can appear between words (token or
+ * quoted-string) and separator characters. */
+ { "attachment ; filename=foo", "attachment", "foo" },
+ { "attachment; filename =foo", "attachment", "foo" },
+ { "attachment; filename= foo", "attachment", "foo" },
+ { "attachment; filename = foo", "attachment", "foo" },
+ { "attachment ; filename = foo", "attachment", "foo" },
+
/* See http://test.greenbytes.de/tech/tc2231/ */
{ "inline", "inline", NULL },
{ "\"inline\"", NULL, NULL },