Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86ADB11383 for ; Wed, 13 Aug 2014 22:52:13 +0000 (UTC) Received: (qmail 76232 invoked by uid 500); 13 Aug 2014 22:52:13 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 76181 invoked by uid 500); 13 Aug 2014 22:52:13 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 76166 invoked by uid 99); 13 Aug 2014 22:52:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2014 22:52:13 +0000 Date: Wed, 13 Aug 2014 22:52:13 +0000 (UTC) From: "Gabriele Columbro (JIRA)" To: dev@chemistry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CMIS-715) MimeHelper.decodeContentDispositionFilename() decoding issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-715?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Gabriele Columbro updated CMIS-715: ----------------------------------- Fix Version/s: (was: OpenCMIS 1.0.0) OpenCMIS 0.12.0 > 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 > Reporter: jay brown > Assignee: Florian M=C3=BCller > Fix For: OpenCMIS 0.12.0 > > > 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 look= s like this: > Content-Disposition: attachment; filename*=3DUTF-8''%66%6c%61%73%6= b%2d%64%6f%63%73.pdf; size=3D893099; creation-date=3DMon, 12 Aug 2013 22:02= :54 -0700; modification-date=3DMon, 12 Aug 2013 22:02:55 -0700; > But the call > contentStream =3D getBinding().getObjectService().getContentStream(ge= tRepositoryId(), docId.getId(), streamId, offset, length, null) which GET C= ontentStream/idd_B7569CE7-47B8-46F4-BF30-67FD2A903B32/-1/doc0 =20 > returns a corrupted string like "f ` as` do`a" or something like that. = =20 > (some encoding that is not right) > Opencmis code below to set filename for content > String filename =3D null; > String contentDisposition =3D resp.getHeader("Content-Disposition= "); =20 > if (contentDisposition !=3D null) { > filename =3D MimeHelper.decodeContentDispositionFilename(cont= entDisposition); > } =20 > You can use our interop server to reproduce (contact me for credentials) > Need to fix for 1.0.0 -- This message was sent by Atlassian JIRA (v6.2#6252)