[Rt-commit] rt branch, 4.0/rfc2231-param-continuations, updated. rt-4.0.4-114-g3b65a0a

Thomas Sibley trs at bestpractical.com
Fri Dec 9 15:29:26 EST 2011


The branch, 4.0/rfc2231-param-continuations has been updated
       via  3b65a0a4401c1fc691908f4687cff791816bd0aa (commit)
      from  c13183e470c1fa40420c36b3839a1318a7a3806b (commit)

Summary of changes:
 .../rfc2231-attachment-filename-continuations      |   36 ++++++++++++++++++++
 t/mail/rfc2231-attachment.t                        |   28 +++++++++++++++
 2 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 t/data/emails/rfc2231-attachment-filename-continuations
 create mode 100644 t/mail/rfc2231-attachment.t

- Log -----------------------------------------------------------------
commit 3b65a0a4401c1fc691908f4687cff791816bd0aa
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Dec 9 15:23:55 2011 -0500

    Test RFC 2231 parameter continuations with encoding in an attachment filename
    
    This is a real world example that currently fails.

diff --git a/t/data/emails/rfc2231-attachment-filename-continuations b/t/data/emails/rfc2231-attachment-filename-continuations
new file mode 100644
index 0000000..80a5241
--- /dev/null
+++ b/t/data/emails/rfc2231-attachment-filename-continuations
@@ -0,0 +1,36 @@
+Message-ID: <somemsgid at lucky.nifty.jp>
+Date: Wed, 7 Dec 2011 20:32:40 +0900 (JST)
+From: root at localhost
+Subject: Client =?ISO-2022-JP?B?Pw==?= Japanese Attachment Name issue
+MIME-Version: 1.0
+Content-Type: multipart/mixed; 
+	boundary="----=_Part_2017_4220946.1323257560967"
+X-Priority: 3
+X-MSMail-Priority: Normal
+Priority: normal
+X-Mailer: @nifty Webmail
+
+------=_Part_2017_4220946.1323257560967
+Content-Type: text/plain; charset="iso-2022-jp"
+Content-Transfer-Encoding: 7bit
+
+Some data in a file
+
+------=_Part_2017_4220946.1323257560967
+Content-Type: text/plain; 
+	name="=?ISO-2022-JP?B?GyRCPzckNyQkJUYlLSU5JUgbKEIgGyRCJUkbKEI=?=
+ =?ISO-2022-JP?B?GyRCJS0lZSVhJXMlSBsoQi50eHQ=?="
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: inline;
+ filename*0*=ISO-2022-JP'ja'%1b$B%3f7$7$$%25F%25%2d%259%25H%1b%28B;
+ filename*1*=%20;
+ filename*2*=%1b$B%25I%25%2d%25e%25a%25s%25H%1b%28B;
+ filename*3=.txt
+
+=EF=BB=BFSome data in a file with a file name of "=E6=96=B0=E3=81=97=E3=81=
+=84=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88" and "=E3=83=89=E3=82=AD=E3=83=A5=E3=83=
+=A1=E3=83=B3=E3=83=88.txt" joined with a space; for testing in RT with
+
+
+------=_Part_2017_4220946.1323257560967--
+
diff --git a/t/mail/rfc2231-attachment.t b/t/mail/rfc2231-attachment.t
new file mode 100644
index 0000000..fc74c47
--- /dev/null
+++ b/t/mail/rfc2231-attachment.t
@@ -0,0 +1,28 @@
+use strict;
+use warnings;
+
+use utf8;
+use RT::Test tests => undef;
+my ($baseurl, $m) = RT::Test->started_ok;
+ok $m->login, 'logged in as root';
+
+diag "encoded attachment filename with parameter continuations";
+{
+    my $mail = RT::Test->file_content(
+        RT::Test::get_relocatable_file(
+            'rfc2231-attachment-filename-continuations',
+            (File::Spec->updir(), 'data', 'emails')
+        )
+    );
+
+    my ( $status, $id ) = RT::Test->send_via_mailgate($mail);
+    is( $status >> 8, 0, "The mail gateway exited normally" );
+    ok( $id, "Created ticket" );
+
+    $m->get_ok("/Ticket/Display.html?id=$id");
+    $m->content_contains("新しいテキスト ドキュメント.txt", "found full filename");
+}
+
+undef $m;
+done_testing;
+

-----------------------------------------------------------------------


More information about the Rt-commit mailing list