Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 38914 invoked from network); 29 Mar 2007 20:09:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Mar 2007 20:09:50 -0000 Received: (qmail 53419 invoked by uid 500); 29 Mar 2007 20:09:54 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 53315 invoked by uid 500); 29 Mar 2007 20:09:54 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 53276 invoked by uid 99); 29 Mar 2007 20:09:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2007 13:09:54 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2007 13:09:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1F06971407A for ; Thu, 29 Mar 2007 13:09:26 -0700 (PDT) Message-ID: <20610547.1175198966123.JavaMail.jira@brutus> Date: Thu, 29 Mar 2007 13:09:26 -0700 (PDT) From: =?utf-8?Q?J=C3=B6rg_Heinicke_=28JIRA=29?= To: dev@cocoon.apache.org Subject: [jira] Closed: (COCOON-2022) broken URI handling in ZipSource In-Reply-To: <11256148.1173733749242.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COCOON-2022?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] J=C3=B6rg Heinicke closed COCOON-2022. --------------------------------- Resolution: Fixed next try ... > broken URI handling in ZipSource > -------------------------------- > > Key: COCOON-2022 > URL: https://issues.apache.org/jira/browse/COCOON-2022 > Project: Cocoon > Issue Type: Bug > Components: * Cocoon Core > Affects Versions: 2.1.10 > Reporter: J=C3=B6rg Heinicke > Assigned To: J=C3=B6rg Heinicke > Priority: Minor > Fix For: 2.1.11-dev (Current SVN), 2.2-dev (Current SVN) > > > On behalf of Leonid Geller: http://marc.theaimsgroup.com/?t=3D11733727550= 0004&r=3D1&w=3D4: > 1. Bug in org.apache.cocoon.components.source.impl.ZipSourceFactory, on t= his line: > // Get protocol. Protocol is configurable via cocoon.xconf > final String protocol =3D location.substring(0, protocolEnd - 1); > Obviously it should be location.substring(0, protocolEnd). This is what c= auses zip to be truncated to "zi". > 2. When using a SYSTEM identifier with relative DTD path, the XML parser = will look for the file relative to the URI of the zipped source, zip:archiv= e.zip!/source.xml which is obviously going to fail. > Here, the solution is to have the source implementation class (in this ca= se org.apache.cocoon.components.source.impl.ZipSource) to change getURI met= hod to return source.xml based on archive.zip location, w/o the zip protoco= l. Current implementation: > =09return this.protocol + this.archive.getURI() + "!/" + this.filePath; > is not going to work. Something like this will: > =09int iZipIdx =3D this.archive.getURI().lastIndexOf("/"); > =09if (iZipIdx < 0) iZipIdx =3D 0; > =09return this.archive.getURI().substring(0,iZipIdx)+"/"+ this.filePa= th; --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.