Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 97654 invoked from network); 27 Dec 2007 20:03:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Dec 2007 20:03:21 -0000 Received: (qmail 7897 invoked by uid 500); 27 Dec 2007 20:03:10 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 7827 invoked by uid 500); 27 Dec 2007 20:03:09 -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 7816 invoked by uid 99); 27 Dec 2007 20:03:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2007 12:03:09 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [88.198.46.98] (HELO indoqa.com) (88.198.46.98) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2007 20:02:45 +0000 Received: from [192.168.1.32] (chello062178239020.5.15.vie.surfer.at [62.178.239.20]) by indoqa.com (Postfix) with ESMTP id 44E3F254597 for ; Thu, 27 Dec 2007 21:19:56 +0100 (CET) Message-ID: <477404E5.7030809@apache.org> Date: Thu, 27 Dec 2007 21:02:45 +0100 From: Reinhard Poetz User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [jira] Created: (COCOON-2154) Servlet:/ protocol: Support absolute URIs References: <11551087.1198667503258.JavaMail.jira@brutus> <4772380E.7020107@tuffmail.com> <4772991D.2040102@apache.org> <4772C133.9090906@tuffmail.com> In-Reply-To: <4772C133.9090906@tuffmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Grzegorz Kossakowski wrote: > Reinhard Poetz pisze: >>> Hi Reinhard, isn't it a duplicate of >>> https://issues.apache.org/jira/browse/COCOON-2044 ? >> Not really. If I read that issue correctly, it talks about making cache >> keys unique. I refer to absolute servlet:/ URIs, e.g. >> >> servlet:com.mycompany.project.servlet.service+:/test/foo/bar > > In the discussion of COCOON-2044 it is mentioned that non-uniqueness of cache > keys is caused by bad implementation of servlet service because it returns > relative URIs instead of absolute ones when getURI() method is called. So in > order to fix COCOON-2044 you just need essentially to implement support of > absolute URI for servlet: protocol. That's why I see it as duplicate. I've rewritten the ServletConnection and it always expects now globally absolute URIs. If a service-relative URI is being resolved, the ServletSource can translate it into an absolute one. This should fix the cache key generation problem too. >> Btw, after reading the URI spec and making some experiments with the URI >> class of Java, I figured out that the originally proposed "!" at the >> beginning of the sub schema is not allowed, however, appending a "+" is. >> This is required in order to distinguish between relative and absolute >> servlet:/ URIs. > > Plus sign doesn't look naturally for me. Are there any other options? Citing RFC 2396: Scheme names consist of a sequence of characters beginning with a lower case letter and followed by any combination of lower case letters, digits, plus ("+"), period ("."), or hyphen ("-"). For resiliency, programs interpreting URI should treat upper case letters as equivalent to lower case in scheme names (e.g., allow "HTTP" as well as "http"). scheme = alpha *( alpha | digit | "+" | "-" | "." ) But since I strongly discourage from using absolute URIs directly, I don't consider it being a big issue. -- Reinhard Pötz Managing Director, {Indoqa} GmbH http://www.indoqa.com/en/people/reinhard.poetz/ Member of the Apache Software Foundation Apache Cocoon Committer, PMC member, PMC Chair reinhard@apache.org _________________________________________________________________________