Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 23464 invoked from network); 3 Jan 2008 12:50:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jan 2008 12:50:02 -0000 Received: (qmail 15915 invoked by uid 500); 3 Jan 2008 12:49:49 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 15862 invoked by uid 500); 3 Jan 2008 12:49:49 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 15851 invoked by uid 99); 3 Jan 2008 12:49:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 04:49:49 -0800 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, 03 Jan 2008 12:49:44 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C54C971422C for ; Thu, 3 Jan 2008 04:49:35 -0800 (PST) Message-ID: <18617008.1199364575801.JavaMail.jira@brutus> Date: Thu, 3 Jan 2008 04:49:35 -0800 (PST) From: "Simon Kitching (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Commented: (MYFACES-1798) DefaultViewHandlerSupports fails detecting extension if there are dots in the path In-Reply-To: <4550237.1199352693862.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/MYFACES-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555557#action_12555557 ] Simon Kitching commented on MYFACES-1798: ----------------------------------------- What about paths like: /my.strange.path/faces/welcome Using just "lastIndexOf" will not return the expected value. Agreed, it is no worse than the current solution, but if this is being fixed now, it would be nice to fix it properly. How about looking for lastIndexOf("/") and only falling into the "extension mapping" case when the last dot is after the last slash? And is it valid to have an extension with two dots, eg ".faces.jsf"? Ideally, it would be best to first look up what suffixes we expect, then use "endsWith" to determine which one is present on the url..don't know if that is possible or not though.. > DefaultViewHandlerSupports fails detecting extension if there are dots in the path > ---------------------------------------------------------------------------------- > > Key: MYFACES-1798 > URL: https://issues.apache.org/jira/browse/MYFACES-1798 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 1.2.0 > Reporter: Mario Ivankovits > Assignee: Mario Ivankovits > Fix For: 1.2.2-SNAPSHOT > > > For example: With "/myStrange.path/view.jsp" the extension ".path/view.jsp" will be derived. > In DefaultViewHandlerSupport a wrong regular expression is used to extract the extension. > I'll try to change this to a simple string.lastIndexOf('.') as this should do exactly what we want. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.