Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 99012 invoked from network); 4 Jun 2002 21:36:57 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Jun 2002 21:36:57 -0000 Received: (qmail 26213 invoked by uid 97); 4 Jun 2002 21:32:47 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 26119 invoked by uid 97); 4 Jun 2002 21:32:47 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 26036 invoked by uid 98); 4 Jun 2002 21:32:46 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <000701c20bf7$78be72d0$64859181@apache.org> From: "Remy Maucherat" To: Subject: Re: http 302 issue on tomcat 4.0.1 Date: Tue, 4 Jun 2002 11:41:42 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: localhost.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > if matchingWelcomeFile.contains("/"): > # psycopathic case no one cares about ( ie. welcome file is a/b.jsp ) > redirect, old style //we show the filename here, but if we didn't we'd > break relative paths > else: > if path.endsWith("/"): > # happy, smiley family case > redispatch, using welcome-file full path (ie. /foo/index.jsp ) for > security checking This redirect may cause problems, because it will happen regardless of whether or not the path exist (or it makes sense to redirect). Example: You have index.jsp and index.html in the welcome files. No matter what you do, the request will always be redirected to Jasper, which will always return a 404. Checking for the presence of the physical file won't work either (you could have a *.do mapping like Struts uses). Any idea to avoid that problem ? Also, the changes are going to make the mapping slower. I plan to refactor that operation (use an automaton and bytes instead of String manipulations) in the next major version of Tomcat, which should help tremendously, but until then ... > else: > if adding slash causes a servlet mapping match: > # we handle the stupid case of having two servlet mappings > # ( /foo and /foo/ ) in web.xml. > redirect, old style //we show the filename here, but if we didn't > we'd call the wrong servlet > else: > redirect, adding "/" ( ie. redirect /foo to /foo/ ) Remy -- To unsubscribe, e-mail: For additional commands, e-mail: