From tomcat-bugs@cortexity.com Fri Sep 22 02:14:53 2000 Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 99071 invoked from network); 22 Sep 2000 02:14:53 -0000 Received: from msp-26-164-174.mn.rr.com (HELO localhost.localdomain) (24.26.164.174) by locus.apache.org with SMTP; 22 Sep 2000 02:14:53 -0000 Received: from fatman (IDENT:nobody@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.9.3) with SMTP id UAA02389 for ; Thu, 21 Sep 2000 20:13:18 -0500 Message-ID: <134741736.969585198214.JavaMail.nobody@fatman> Date: Thu, 21 Sep 2000 20:13:18 -0500 (CDT) From: BugRat Mail System Reply-To: BugRat Mail System To: tomcat-bugs@cortexity.com Subject: BugRat Report #152 has been filed. Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="134744688.969585198183.JavaMail.nobody@fatman" X-Mailer: org.gjt.mail.EnhancedMimeMsg, Organization: The Giant Java Tree, X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N --134744688.969585198183.JavaMail.nobody@fatman Content-Type: text/plain Content-Transfer-Encoding: 7bit Bug report #152 has just been filed. You can view the report at the following URL: REPORT #152 Details. Project: Tomcat Category: Bug Report SubCategory: New Bug Report Class: swbug State: received Priority: high Severity: critical Confidence: public Environment: Release: 3.2b4 JVM Release: 1.2.2 Operating System: HP-UX OS Release: 11.04 Platform: HP Synopsis: Infinite loop in PrefixManager.java Description: While running some tests with TomCat, I uncovered an infinite loop in PrefixManager.java. The routine getLongestPrefixMatch has the following chunk of code: while (s.length() >= 0) { //if(debug>8) context.log( "Prefix: " + s ); container = myMap.prefixMappedServlets.get(s); if (container == null) { s=URLUtil.removeLast( s ); } else { if( myMap.mapCacheEnabled ) { // XXX implement LRU or another replacement alghoritm myMap.mapCache.put( path, container ); } return container; } } return container; } The problem is that if myMap.prefixMappedServlet.get(s) never finds a container, the code goes into an infinite loop: I changed the while statement to: while (s.length() > 0) { and at least it exited and threw an execption. This situation occurred when I had a servlet mapped to a URL /myurl but then used a custom application going through a proxy server that changed the url: https://www.xxx.com/myurl to http://www.xxx.com:443/myurl --134744688.969585198183.JavaMail.nobody@fatman Content-Type: text/html; name=Report-152.html Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=Report-152.html Content-Description: DataSource attachment 'Report-152.html' BugRat Report # 152

BugRat Report # 152

Project: Tomcat Release: 3.2b4
Category: Bug Report SubCategory: New Bug Report
Class: swbug State: received
Priority: high Severity: critical
Confidence: public

Submitter: _Anonymous ( anonymous-bug@cortexity.com )
Date Submitted: Sep 21 2000, 08:13:18 CDT
Responsible: Z_Tomcat Alias ( tomcat-bugs@cortexity.com )

Synopsis:
Infinite loop in PrefixManager.java
Environment: (jvm, os, osrel, platform)
1.2.2, HP-UX, 11.04, HP

Additional Environment Description:
HP 9000/871/D270 dual CPU HP-UX 11.04 with JDK 1.2.2_04 (Hotspot enabled) TomCat 3.2 Beta 4

Report Description:
While running some tests with TomCat, I uncovered an infinite loop in PrefixManager.java. The routine getLongestPrefixMatch has the following chunk of code: while (s.length() >= 0) { //if(debug>8) context.log( "Prefix: " + s ); container = myMap.prefixMappedServlets.get(s); if (container == null) { s=URLUtil.removeLast( s ); } else { if( myMap.mapCacheEnabled ) { // XXX implement LRU or another replacement alghoritm myMap.mapCache.put( path, container ); } return container; } } return container; } The problem is that if myMap.prefixMappedServlet.get(s) never finds a container, the code goes into an infinite loop: I changed the while statement to: while (s.length() > 0) { and at least it exited and threw an execption. This situation occurred when I had a servlet mapped to a URL /myurl but then used a custom application going through a proxy server that changed the url: https://www.xxx.com/myurl to http://www.xxx.com:443/myurl

View this report online...
--134744688.969585198183.JavaMail.nobody@fatman--