Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7FBF64D0C for ; Mon, 9 May 2011 10:32:34 +0000 (UTC) Received: (qmail 59216 invoked by uid 500); 9 May 2011 10:32:30 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 58996 invoked by uid 500); 9 May 2011 10:32:30 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 58987 invoked by uid 99); 9 May 2011 10:32:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 10:32:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mindas@gmail.com designates 209.85.216.45 as permitted sender) Received: from [209.85.216.45] (HELO mail-qw0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 10:32:23 +0000 Received: by qwj8 with SMTP id 8so4493504qwj.18 for ; Mon, 09 May 2011 03:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=Kp+u4riuFCF4jN0cBGw2ZsOEOI9x63nq3PvsUPHm53k=; b=igKvXpHoFUfqhiwl3s5Wz6N0quWHh33h0NyDb7pH9PX6JjZOAh3U/M9isCtCGdL29m 1wytbugzUdkLpW1n7YLZdqUBULLuWvrUXaJDzQQNM+2HMWl2a36FMUCuR8umi7VZo2ZJ buBxzFm8TKSSLGa9datbRKn1JwPDOWGyIfxoU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=lwYUXNW1qjzNkV1OeVbC+BSBEaRMKmhFLgd8S5voYhWr/EM7IITPIr/mERhgG14b+m cJWSNYrgnppUKtro8ECc1b1SEa4xLJy7eabedMWcxV1aQvGZOiJiO1wM9cKVM9X0Cabh lAEmyUg4iCNmCG6X/gws+IXeZz6376+rlEIQY= MIME-Version: 1.0 Received: by 10.229.77.205 with SMTP id h13mr4895031qck.287.1304937122061; Mon, 09 May 2011 03:32:02 -0700 (PDT) Received: by 10.229.77.214 with HTTP; Mon, 9 May 2011 03:32:02 -0700 (PDT) Date: Mon, 9 May 2011 11:32:02 +0100 Message-ID: Subject: Semicolon URI encoding and RFC From: =?ISO-8859-13?Q?Mindaugas_=DEak=F0auskas?= To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi, I was trying to read RFCs 3986 and 2396 to understand some subtleties about URI encoding. In particular I am interested about whether semicolon (;) needs to be percent escaped as, e.g. http://site/some;path VS http://site/some%3Bpath when outputting e.g. HTML href element. Just for interest, here's what I get in both Tomcat 6.0.26.0 and 7.0.12.0: href URI ((HttpServletRequest) request).getServletPath() http://site/foo /foo http://site/test1;test2 /test1 http://site/test1%3Btest2 /test1;test2 http://site/test1)test2/ /test1)test2/ According to RFC 3986, both semicolon and closing bracket ')' belongs to sub-delims class but one needs escaping and another doesn't. Is this expected behaviour? I have asked this question on StackOverflow, and the answerer guessed that Tomcat is following older RFC 2396. Can anyone clarify? Regards, Mindaugas --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org