Return-Path: Delivered-To: apmail-jakarta-httpcomponents-dev-archive@www.apache.org Received: (qmail 53659 invoked from network); 25 Oct 2007 13:34:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Oct 2007 13:34:58 -0000 Received: (qmail 41011 invoked by uid 500); 25 Oct 2007 13:34:45 -0000 Delivered-To: apmail-jakarta-httpcomponents-dev-archive@jakarta.apache.org Received: (qmail 40975 invoked by uid 500); 25 Oct 2007 13:34:44 -0000 Mailing-List: contact httpcomponents-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list httpcomponents-dev@jakarta.apache.org Received: (qmail 40966 invoked by uid 99); 25 Oct 2007 13:34:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2007 06:34:44 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of odi@odi.ch designates 62.65.128.36 as permitted sender) Received: from [62.65.128.36] (HELO smtp.2wire.ch) (62.65.128.36) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2007 13:34:46 +0000 Received: from gollum.odi.ch (gw.ptr-80-238-206-109.customer.ch.netstream.com [80.238.206.109]) by smtp.2wire.ch (Postfix) with ESMTP id 9F7402C09A for ; Thu, 25 Oct 2007 15:29:19 +0200 (CEST) Received: from [10.11.1.196] (cvs.logobject.ch [81.7.230.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gollum.odi.ch (Postfix) with ESMTP id E417A5157 for ; Thu, 25 Oct 2007 15:33:53 +0200 (CEST) Message-ID: <47209B49.8000504@odi.ch> Date: Thu, 25 Oct 2007 15:34:01 +0200 From: =?UTF-8?B?T3J0d2luIEdsw7xjaw==?= User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: HttpComponents Project Subject: Re: [HttpClient] Adjusting location URIs References: <11352840.631591193318196043.JavaMail.servlet@kundenserver> In-Reply-To: <11352840.631591193318196043.JavaMail.servlet@kundenserver> X-Enigmail-Version: 0.95.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org ossfwot@dubioso.net wrote: > Hello Odi, > >> Consider mod_jk configured to map >> - /1/context -> /context on host1 >> - /2/context -> /context on host2 >> >> The webapp can not know of the /1 and /2 prefix that the client used in >> its original request. So mod_jk would have to rewrite the location >> header (apparently doesn't). > > Yes, it should process responses in the reverse way > of processing the request. That would also mean to rewrite URLs in the message body - and that's not something you really want. But yes, I agree, that would be "correct". > See, there is a problem. Relative HTML links are > resolved relative to the tag in the HTML, > if present. Then there's the Content-Location that > can give the base on the HTTP level. And finally, > the request URI is the last fallback. Okay, it makes sense to use Content-Location in that light. >>> Or the Content-Location header, if present? >> That interpretation seems quite arbitrary to me. >> Any real-world examples where this header is used? > > I'd expect that real-world browsers would screw up > badly if anyone actually used Content-Location. I > noticed it a few years ago, it's probably as widely > used as transfer compression ;-) At least for websites. or Multipart MIME responses ;-) >> We are speaking about the option when we explicitly allow relative >> redirects. So treat them in the most meaningful way. > > I always considered that to mean server-relative > but path-absolute. Anyway, go ahead with using the > request URI as the base. It's not like we've got > a spec we could violate with that :-) Prepare for a user who wants to supply his custom base URI... Maybe we should put that code in a protected method, so it can easily be replaced in a subclass? > cheers, > Roland Odi -- [web] http://www.odi.ch/ [blog] http://www.odi.ch/weblog/ [pgp] key 0x81CF3416 finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416 --------------------------------------------------------------------- To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org