Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 66310 invoked from network); 13 Oct 2008 11:53:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Oct 2008 11:53:39 -0000 Received: (qmail 80036 invoked by uid 500); 13 Oct 2008 11:53:39 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 79985 invoked by uid 500); 13 Oct 2008 11:53:38 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 79974 invoked by uid 99); 13 Oct 2008 11:53:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Oct 2008 04:53:38 -0700 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Oct 2008 11:52:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BF7BC234C217 for ; Mon, 13 Oct 2008 04:52:47 -0700 (PDT) Message-ID: <868477522.1223898767769.JavaMail.jira@brutus> Date: Mon, 13 Oct 2008 04:52:47 -0700 (PDT) From: "Rob Walker (JIRA)" To: dev@felix.apache.org Subject: [jira] Assigned: (FELIX-763) Jetty6 version of Http doesn't resolve aliases according to OSGi spec In-Reply-To: <1412880964.1223877044212.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rob Walker reassigned FELIX-763: -------------------------------- Assignee: Rob Walker > Jetty6 version of Http doesn't resolve aliases according to OSGi spec > --------------------------------------------------------------------- > > Key: FELIX-763 > URL: https://issues.apache.org/jira/browse/FELIX-763 > Project: Felix > Issue Type: Bug > Components: HTTP Service > Reporter: Rob Walker > Assignee: Rob Walker > > We have both of the following aliases mounted for resource serving: > * /VtWebUi - served by a "WebUiContext" class > * /VtWebUi/logs - served by a "LogsContext" class > A request to > http://localhost:8084/VtWebUi > is getting directed to the LogsContext class (which serves /VtWebUi/logs) - > and the attached resource path is empty > According to my understanding (and the previous Jetty 4 version) - this > should get directed to the "WebUiContext" > ==== > Form further analysis: > This looks definitely wrong to me in the current SVN rev, albeit our usage is a strange case that perhaps not many use, I think the new internal operation is wrong > We have a very similar example to the table in 102.4 of the R4 companion spec. > alias 1 - /VtWebUi > alias 2 - /VtWebUi/logs > To me - a request for /VtWebUi - should only get routed to the getResource of alias 1? > I can't see any way according to the spec, the getResource of alias 2 should be called - it's not a matching substring, even if the getResource for alias 1 returned null (which it wouldn't in our case anyhow). > === > Additional info: > Hmmm - some further clues that something may be amiss here: > //fails: > //srvHttp.registerResources(alias, "", myContext); > //srvHttp.registerResources(alias + logsAlias, "", this.envLogsContext); > //works: > srvHttp.registerResources(alias + logsAlias, "", this.envLogsContext); > srvHttp.registerResources(alias, "", myContext); > Simply swapping the order of registration changes the behaviour , not quite to fully working - but a lot closer. > I'm fairly sure the order of registration shouldn't change any behaviour, except in the case of a duplicate alias exception - which this isn't. The OSGi rules for walking back down a substring of aliases until there's a match aren't based on which got registered first > Looking at the traces, Jetty seems to be using later registered aliases first - hence why the swap makes a difference. I suspect what is broken here is how Jetty does path matching to servlets - it doesn't look like it matches according to alias rules for OSGi in this newer Jetty version. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.