mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ALF-16381: Incorrect mimetype detection returns text/html mimetype for .eml files, not Email
- Added simple test file which demonstrates the issue - Added unit test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@44821 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -116,6 +116,12 @@ public class MimetypeMapContentTest extends TestCase
|
|||||||
"application/msword",
|
"application/msword",
|
||||||
mimetypeService.guessMimetype("something.doc", truncReader)
|
mimetypeService.guessMimetype("something.doc", truncReader)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Lotus notes EML files (ALF-16381 / TIKA-1042)
|
||||||
|
assertEquals(
|
||||||
|
"message/rfc822",
|
||||||
|
mimetypeService.guessMimetype("something.eml", openQuickTestFile("quickLotus.eml"))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ContentReader openQuickTestFile(String filename)
|
private ContentReader openQuickTestFile(String filename)
|
||||||
|
71
source/test-resources/quick/quickLotus.eml
Normal file
71
source/test-resources/quick/quickLotus.eml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
X-Notes-Item: CN=XXXX/OU=XX/OU=XXXX/O=XXX/C=XX;
|
||||||
|
flags=44; name=ForwardedFrom
|
||||||
|
X-Notes-Item: Thu, 4 Oct 2012 13:01:56 +0200;
|
||||||
|
type=400; name=ForwardedDate
|
||||||
|
X-Notes-Item: Thu, 4 Oct 2012 13:02:39 +0200;
|
||||||
|
type=400; name=OriginalModTime
|
||||||
|
X-Notes-Item: .;
|
||||||
|
name=$StorageTo
|
||||||
|
X-Notes-Item: 62AEA923:7CEE804A-C1257A8D:003C970D;
|
||||||
|
type=4; name=$Orig
|
||||||
|
X-Notes-Item: 2031619;
|
||||||
|
name=MIMEMailHeaderCharset
|
||||||
|
MIME-Version: 1.0
|
||||||
|
X-Mailer: Lotus Notes Release 8.5.3 September 15, 2011
|
||||||
|
Message-ID: <OF62AEA923.7CEE804A-ONC1257A8D.003C970D-C1257A8D.003CAB24@LocalDomain>
|
||||||
|
Date: Thu, 4 Oct 2012 13:02:39 +0200
|
||||||
|
X-Notes-Item: 0;
|
||||||
|
name=MAILOPTIONS
|
||||||
|
X-Notes-Item: 1;
|
||||||
|
name=SaveOptions
|
||||||
|
X-Notes-Item: Memo;
|
||||||
|
name=Form
|
||||||
|
From: XXX.XXX@XXXX.de
|
||||||
|
X-Notes-Item: CN=XXXX/OU=XX/OU=XXXX/O=XXX/C=XX;
|
||||||
|
name=AltFrom
|
||||||
|
X-Notes-Item: StdNotesLtr25;
|
||||||
|
name=Logo
|
||||||
|
X-Notes-Item: StdNotesLtr25;
|
||||||
|
name=dLogo
|
||||||
|
X-Notes-Item: True;
|
||||||
|
name=useApplet
|
||||||
|
X-Notes-Item: 1;
|
||||||
|
name=DefaultMailSaveOptions
|
||||||
|
X-Notes-Item: ;
|
||||||
|
name=Query_String
|
||||||
|
X-Notes-Item: 1;
|
||||||
|
name=ExpandPersonalGroups
|
||||||
|
To: XXXX@alfresco.com
|
||||||
|
X-Notes-Item: ;
|
||||||
|
flags=44; name=INetCopyTo
|
||||||
|
X-Notes-Item: ;
|
||||||
|
flags=44; name=INetBlindCopyTo
|
||||||
|
X-Notes-Item: ;
|
||||||
|
name=tmpImp
|
||||||
|
X-Notes-Item: ;
|
||||||
|
name=Sign
|
||||||
|
X-Notes-Item: ;
|
||||||
|
name=Encrypt
|
||||||
|
X-Notes-Item: ;
|
||||||
|
name=tmpClassification
|
||||||
|
X-Notes-Item: ;
|
||||||
|
name=SetClassification
|
||||||
|
X-Notes-Item: 1;
|
||||||
|
name=$NoteHasNativeMIME
|
||||||
|
X-MIMETrack: Serialize by Notes Client on XXXX(Release
|
||||||
|
8.5.3|September 15, 2011) at 25.10.2012 12:14:50
|
||||||
|
Content-type: multipart/related;
|
||||||
|
Boundary="0__=4EBBF01EDFAF119D8f9e8a93df938690918c4EBBF01EDFAF119D"
|
||||||
|
Content-Disposition: inline
|
||||||
|
|
||||||
|
--0__=4EBBF01EDFAF119D8f9e8a93df938690918c4EBBF01EDFAF119D
|
||||||
|
Content-type: text/html; charset=ISO-8859-1
|
||||||
|
Content-Disposition: inline
|
||||||
|
Content-transfer-encoding: quoted-printable
|
||||||
|
|
||||||
|
<html><body>
|
||||||
|
The quick brown fox jumps over the lazy dog
|
||||||
|
</body></html>=
|
||||||
|
|
||||||
|
--0__=4EBBF01EDFAF119D8f9e8a93df938690918c4EBBF01EDFAF119D--
|
||||||
|
|
Reference in New Issue
Block a user