Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 780EF200A01 for ; Tue, 3 May 2016 15:42:44 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7765E1609F4; Tue, 3 May 2016 15:42:44 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BDAF31609A9 for ; Tue, 3 May 2016 15:42:43 +0200 (CEST) Received: (qmail 37550 invoked by uid 500); 3 May 2016 13:42:41 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 37538 invoked by uid 99); 3 May 2016 13:42:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 13:42:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id EB161C04B9 for ; Tue, 3 May 2016 13:42:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.129 X-Spam-Level: ** X-Spam-Status: No, score=2.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id l3xCrZN5giK3 for ; Tue, 3 May 2016 13:42:38 +0000 (UTC) Received: from mail-yw0-f175.google.com (mail-yw0-f175.google.com [209.85.161.175]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id A67735F484 for ; Tue, 3 May 2016 13:42:38 +0000 (UTC) Received: by mail-yw0-f175.google.com with SMTP id j74so18190036ywg.1 for ; Tue, 03 May 2016 06:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=WwPv5aRoN5BowcD/HatnByVcq+6r4VQnQYysYuop/ZY=; b=P3tKTiQ5iC1G/KVQH99EVXf2dvGCvUl93g4Y4QDPKd8zRmeykLvSExfCIxhzqXws3P W2RGWqCaXcQhcTLRyutqrYx37K1oSyQMpwd1H6HvR7IiXsGaQiK+7labISllGjyidtzG qEbOhRlneO3SBaABHGyO/wrZ84+ciN48CctihVFVP8ruOjZlnTllHjDJ6dD4eOy7IvzN F7R5WmQ5Hqri1qrI0wehq9yIQgvCueTp+IOoVFMwiYR3Q4u1iYWM3k/KJkZDOpFkKH7T mLOPahNhqF9sbrUIBiw9Ds0pyFND/zAR07RVhcifX17yHTUOsbb7CJP7+nTQI/ywiotK dWiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=WwPv5aRoN5BowcD/HatnByVcq+6r4VQnQYysYuop/ZY=; b=O04kuj/qDxgnNxIMOMEnu2whauruZUsiTSgp4N+rrYDlYaDzv2QFbq6SP3mcqeCWtL Yr9pqBdX0CBP768W1cRcpmGBAB56X+WNNxBH8e15nMGlFxTjNc+71VcOnSH+zPxKWSqB kJlR2EF8p6qXAGu8UMZjzAfxjbyjQJFDUynHimwAYibl09zHGvT3JvsRwZQLSnUKg3X4 yQax5MQKd6Jl+STb819WMKCAumYoHQo1QPYAqE8OB2TFzuMxdGDKRHTb5bDz8MOc/KX7 ZsPLR5pEMS59SMZhL3EW4ST2qcDBtI+5cFA6i+h7qNnvBmbW8hq5XqLtEviZX07ecc8t 1Smg== X-Gm-Message-State: AOPr4FUFnEvL/XmnDEOJg6mRb+Crdk3G3oH50R5rzijmIU2Rt1G1DXHDiWKml8t61/6Ky/Peo4kVzihUM+qKZw== MIME-Version: 1.0 X-Received: by 10.37.71.3 with SMTP id u3mr1165347yba.36.1462282952163; Tue, 03 May 2016 06:42:32 -0700 (PDT) Received: by 10.129.15.214 with HTTP; Tue, 3 May 2016 06:42:32 -0700 (PDT) In-Reply-To: <5720A1A1.5010409@apache.org> References: <5720A1A1.5010409@apache.org> Date: Tue, 3 May 2016 16:42:32 +0300 Message-ID: Subject: Re: Difference in the behaviour of WebappClassLoaderBase.getResource for jar resources From: Violeta Georgieva To: Tomcat Developers List Content-Type: multipart/alternative; boundary=001a1142326cecca480531f047b5 archived-at: Tue, 03 May 2016 13:42:44 -0000 --001a1142326cecca480531f047b5 Content-Type: text/plain; charset=UTF-8 2016-04-27 14:25 GMT+03:00 Mark Thomas : > > On 27/04/2016 12:00, Violeta Georgieva wrote: > > Hi, > > > > I have a question about difference in the behaviour of > > org.apache.catalina.loader.WebappClassLoaderBase.getResource(String). > > I'm investigating the issue reported here [1]. > > > > In Tomcat 8+ when WebappClassLoaderBase.getResource is invoked with a path > > that represents a jar resource and starts with a slash > > (classpath:/schema/shibboleth-2.0-services.xsd) this resource will be > > served. > > In > > org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(String) > > it is clearly stated that when the path starts with a slash then this > > leading slash will be removed. > > > > In Tomcat 7 WebappClassLoaderBase.getResource, such resource will not be > > found. If I remove the leading slash everything is OK. > > > > Is that difference intentional or I can apply a change for removing the > > leading slash in Tomcat 7 WebappClassLoaderBase? > > The difference isn't intentional but I suspect the fix for 7.0.x will > require a more complex patch. I'd expect the fix to be based around the > DirContext. I'll think about this. Thanks, Violeta > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > --001a1142326cecca480531f047b5--