Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 59463 invoked from network); 7 Jul 2003 13:03:07 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 7 Jul 2003 13:03:07 -0000 Received: (qmail 5619 invoked by uid 97); 7 Jul 2003 13:05:33 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 5612 invoked from network); 7 Jul 2003 13:05:33 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 7 Jul 2003 13:05:33 -0000 Received: (qmail 58078 invoked by uid 500); 7 Jul 2003 13:02:50 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 58063 invoked from network); 7 Jul 2003 13:02:49 -0000 Received: from smtp.dataconnection.com (HELO coltrane.dataconnection.com) (192.91.191.4) by daedalus.apache.org with SMTP; 7 Jul 2003 13:02:49 -0000 Received: by coltrane.datcon.co.uk with Internet Mail Service (5.5.2656.59) id ; Mon, 7 Jul 2003 14:02:44 +0100 Message-ID: <53F74F5A7B94D511841C00B0D0AB16F801220A1B@baker.datcon.co.uk> From: Benjamin Butler-Cole To: "tomcat-user (E-mail)" Subject: Double decoding of URL Date: Mon, 7 Jul 2003 14:02:33 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I am having a problem with Apache/mod_jk/Ajp13Connector/Tomcat. If I make a request to a servlet with '%' in the path, the URL appears to be being decoded twice. I have a servlet mapping of escape -> escape.jsp. That JSP contains the following: <%= request.getPathInfo() %> <%= request.getRequestURL() %> A request to http://localhost/escape/a%25sdf returns /a f http://sekhmet.datcon.co.uk/escape/a%sdf And http://sekhmet/escape/a%21sdf gives /a!sdf http://sekhmet.datcon.co.uk/escape/a!sdf Note that getRequestURL() returns the URL *without* decoding it, while getPathInfo() does decode. So it looks like the URL is already decoded before it reaches Tomcat (by Apache or the connector). I would expect the values of getPathInfo() to be '/a%sdf' and '/a!sdf', and the values of getRequestURL to contain '%25' and '%21'. Does anyone know what's going on? The relevant bits of my configuration files are below. Thanks Ben -- -- -- httpd.conf LoadModule jk_module libexec/mod_jk.so JkWorkersFile "/opt/websrv/tomcat/conf/workers.properties" JkLogFile logs/mod_jk.log JkLogLevel info JkMount /escape/* ajp13 workers.properties worker.list=ajp13 worker.ajp13.type=ajp13 worker.tomcat_home=/opt/websrv/tomcat worker.java_home=/opt/j2sdk1.4.1 ps=/ worker.ajp13.port=8009 worker.ajp13.host=localhost server.xml --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org