Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 10587 invoked from network); 18 Mar 2007 18:14:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Mar 2007 18:14:32 -0000 Received: (qmail 19241 invoked by uid 500); 18 Mar 2007 18:14:39 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 18853 invoked by uid 500); 18 Mar 2007 18:14:38 -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 18840 invoked by uid 99); 18 Mar 2007 18:14:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2007 11:14:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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; Sun, 18 Mar 2007 11:14:29 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6AC1B714071 for ; Sun, 18 Mar 2007 11:14:09 -0700 (PDT) Message-ID: <28431617.1174241649434.JavaMail.jira@brutus> Date: Sun, 18 Mar 2007 11:14:09 -0700 (PDT) From: "Jorg Heymans (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (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.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481964 ]=20 Jorg Heymans commented on COCOON-2022: -------------------------------------- I suggest you bring this up on excalibur-dev.=20 > 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 > > 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.