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/09/05 10:16:54 UTC
[jira] [Commented] (CMIS-715)
MimeHelper.decodeContentDispositionFilename() decoding issue
[ https://issues.apache.org/jira/browse/CMIS-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13758882#comment-13758882 ]
Florian Müller commented on CMIS-715:
-------------------------------------
RFC 2231 defines that hex values must use upper case letters.
The server should send
{{%66%6C%61%73%6B%2D%64%6F%63%73}}
instead of
{{%66%6c%61%73%6b%2d%64%6f%63%73}}
Although the OpenCMIS code is correct, it should be more tolerant. I'll look into that.
> MimeHelper.decodeContentDispositionFilename() decoding issue
> ------------------------------------------------------------
>
> Key: CMIS-715
> URL: https://issues.apache.org/jira/browse/CMIS-715
> Project: Chemistry
> Issue Type: Bug
> Components: opencmis-client
> Affects Versions: OpenCMIS 0.10.0, OpenCMIS 1.0.0
> Reporter: jay brown
>
> Note: problem did not happen in version 0.9.0
> but occurs in latest versions and snapshot
> Problem:
> In a general case we have a file that is named 'flask-docs.pdf'
> When the stream is retrieved by OpenCMIS the respose from our server looks like this:
> Content-Disposition: attachment; filename*=UTF-8''%66%6c%61%73%6b%2d%64%6f%63%73.pdf; size=893099; creation-date=Mon, 12 Aug 2013 22:02:54 -0700; modification-date=Mon, 12 Aug 2013 22:02:55 -0700;
> But the call
> contentStream = getBinding().getObjectService().getContentStream(getRepositoryId(), docId.getId(), streamId, offset, length, null) which GET ContentStream/idd_B7569CE7-47B8-46F4-BF30-67FD2A903B32/-1/doc0
> returns a corrupted string like "f ` as` do`a" or something like that.
> (some encoding that is not right)
> Opencmis code below to set filename for content
> String filename = null;
> String contentDisposition = resp.getHeader("Content-Disposition");
> if (contentDisposition != null) {
> filename = MimeHelper.decodeContentDispositionFilename(contentDisposition);
> }
> You can use our interop server to reproduce (contact me for credentials)
> Need to fix for 1.0.0
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira