Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F079B424F for ; Wed, 29 Jun 2011 16:31:59 +0000 (UTC) Received: (qmail 91018 invoked by uid 500); 29 Jun 2011 16:31:58 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 90908 invoked by uid 500); 29 Jun 2011 16:31:58 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 90899 invoked by uid 99); 29 Jun 2011 16:31:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 16:31:58 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of knst.kolinko@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vx0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 16:31:50 +0000 Received: by vxc11 with SMTP id 11so1492810vxc.18 for ; Wed, 29 Jun 2011 09:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=QaAAQzsTdGAKFkaVZVQq+sbWbveNBsrvTxqgCTi7wLc=; b=cpq8VngWlvy8QoZz3PjaizFHrlpT5roFGm0KsTNZpqbtNS8Y4g+zRnAxdYUy8VAUWv cIRPa6t6oLI3SOCj3EirjAS1Ouw/gtwiZJDYe4OHHEcTvnSQMBf+BDMHA45HWb5JL5zd JdCkILNkhkjsLNFPa9sYALyHv82yVNp7S1A9E= MIME-Version: 1.0 Received: by 10.52.70.205 with SMTP id o13mr1227682vdu.62.1309365089604; Wed, 29 Jun 2011 09:31:29 -0700 (PDT) Received: by 10.52.159.164 with HTTP; Wed, 29 Jun 2011 09:31:29 -0700 (PDT) In-Reply-To: References: <4E0B0822.5000904@kippdata.de> Date: Wed, 29 Jun 2011 20:31:29 +0400 Message-ID: Subject: Re: response.encodeURL("http://localhost:8080") produces an invalid URL? From: Konstantin Kolinko To: Tomcat Developers List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 2011/6/29 Erik Bertelsen : > 2011/6/29 Konstantin Kolinko : > >> >> From HTTP standpoint it should be http://localhost:8080/ and in my >> experience browsers add the trailing slash automatically. I have not >> looked whether the actual HTTP spec is more strict regarding such >> URLs. >> > > Actually my experience is slightly different, i.e. the HTTP servers > send a redirect which adds the trailing /. Redirect is sent for folder -> folder/, but here we are talking about server root ('/'). For the server root the request itself should contain "/". That is taken care by the browser: in an HTTP request, e.g. GET / HTTP/1.0 - the requested path cannot be empty, because multiple spaces are treated as single one. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org