You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Florian Müller (JIRA)" <ji...@apache.org> on 2013/11/27 10:15:36 UTC

[jira] [Commented] (CMIS-737) TCK issue: adding charset in content stream mime type

    [ https://issues.apache.org/jira/browse/CMIS-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13833598#comment-13833598 ] 

Florian Müller commented on CMIS-737:
-------------------------------------

OpenCMIS (and the TCK) treats the MIME type as an opaque string. It doesn't interpret or modify MIME types. So, what you are seeing here has been sent by the repository.

But this test doesn't compare the values of the cmis:contentStreamMimeType properties. It compares the MIME types that have been sent with the content. In case of the AtomPub and the Browser binding these are the values of the HTTP Content-Type header.

> TCK issue: adding charset in content stream mime type
> -----------------------------------------------------
>
>                 Key: CMIS-737
>                 URL: https://issues.apache.org/jira/browse/CMIS-737
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.10.0
>            Reporter: James Li
>            Priority: Minor
>
> Running TCK test against my repository, it got the following error:
> Copy Test (ATOMPUB) (30773 ms)Creates two folders and a document and copies the document from one folder to the other. If the AtomPub binding is used, this test is skipped.
> WARNING: New document object spec compliance (AbstractSessionTest.java:444) [stacktrace]
> WARNING: Content MIME types don't match! (AbstractSessionTest.java:1352) [stacktrace]
> INFO: expected: text/plain / actual: text/plain;charset=utf-8
> WARNING: Copied document check. Id: + copytestdoc.txt (CopyTest.java:76) [stacktrace]
> WARNING: Content MIME types don't match! (AbstractSessionTest.java:1352) [stacktrace]
> INFO: expected: text/plain;charset=utf-8 / actual: text/plain;charset=utf-8;charset=utf-8
> FAILURE: Content streams don't match! (CopyTest.java:80) [stacktrace]
> FAILURE: MIME types don't match! (AbstractSessionTest.java:3192) [stacktrace]
> org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest.assertEquals(AbstractSessionTest.java:3192)
> org.apache.chemistry.opencmis.tck.tests.crud.CopyTest.run(CopyTest.java:80)
> org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest.run(AbstractSessionTest.java:160)
> org.apache.chemistry.opencmis.tck.impl.AbstractCmisTestGroup.run(AbstractCmisTestGroup.java:109)
> INFO: expected: text/plain;charset=utf-8 / actual: text/plain;charset=utf-8;charset=utf-8
> Actually, when the first doc is created, the mime type returned is 
> <cmis:propertyString queryName="cmis:contentStreamMimeType" displayName="Mime Type" localName="MimeType" propertyDefinitionId="cmis:contentStreamMimeType">
>                 <cmis:value>text/plain</cmis:value>
> </cmis:propertyString>
> when the test code line is executed:
> Document doc2 = doc1.copy(folder2, null, versioningState, null, null, null, SELECT_ALL_NO_CACHE_OC); The value in POST document is :
> <cmis:propertyString queryName="cmis:contentStreamMimeType" displayName="Mime Type" localName="MimeType" propertyDefinitionId="cmis:contentStreamMimeType">
>                 <cmis:value>text/plain;charset=utf-8</cmis:value>
>             </cmis:propertyString>
> The TCK result is expected: text/plain;charset=utf-8 / actual: text/plain;charset=utf-8;charset=utf-8
> I don't know when the charset=utf-8 is added to mime type, is this a TCK issue?



--
This message was sent by Atlassian JIRA
(v6.1#6144)