Return-Path: Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 2764 invoked from network); 10 Jul 2003 13:46:55 -0000 Received: from mxout4.cac.washington.edu (140.142.33.19) by daedalus.apache.org with SMTP; 10 Jul 2003 13:46:55 -0000 Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9]) by mxout4.cac.washington.edu (8.12.9+UW03.06/8.12.9+UW03.06) with ESMTP id h6ADkuCK001500 for ; Thu, 10 Jul 2003 06:46:56 -0700 Received: from u.washington.edu (ss07.co.us.ibm.com [32.97.110.72]) (authenticated bits=0) by smtp.washington.edu (8.12.9+UW03.06/8.12.9+UW03.06) with ESMTP id h6ADkqXZ012318 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Thu, 10 Jul 2003 06:46:56 -0700 Message-ID: <3F0D6E1E.8080406@u.washington.edu> Date: Thu, 10 Jul 2003 09:46:06 -0400 From: Michael Becke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030313 Minotaur/0.1a X-Accept-Language: en-us, en MIME-Version: 1.0 To: Commons HttpClient Project Subject: Re: URI class with userinfo ? References: <20030709163354.GA26611@managesoft.com> In-Reply-To: <20030709163354.GA26611@managesoft.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Yes, it seems that none of the methods for getting the full URI include the userinfo. It is intenionaly removed in setURI(): if (_authority != null) { // has_authority if (_userinfo != null) { // by default, remove userinfo part if (_host != null) { buf.append(_host); if (_port != -1) { buf.append(':'); buf.append(_port); } } } else { buf.append(_authority); } } Why is this the case? I have no idea. Anyone else has some thoughts on this one? The only workaround at this point is to build the URI string manually from all of the constituent pieces, much like setURI() does. Mike Marcus Crafter wrote: > Hi All, > > Hope all is well! > > If I put the following text into the URI class: > > ftp://anonymous:guest@localhost/incoming/ > > Is it possible to get that text back out of the URI class via one of the > get* methods, or similar ? > > From what I can see, all return the URI excluding the user info, but I need > in my application I need to get the original string back to pass to the > Avalon SourceResolver library. > > I guess there must be some way to extract the original string ? Have I missed > something somewhere ? > > Cheers, > > Marcus >