tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net URL.java
Date Sun, 16 Jun 2002 05:14:36 GMT

----- Original Message -----
From: "Remy Maucherat" <remm@apache.org>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Saturday, June 15, 2002 12:00 AM
Subject: Re: cvs commit:
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net URL.java


> Bill Barker wrote:
> >>billbarker    2002/06/13 22:34:23
> >>
> >>  Modified:    util/java/org/apache/tomcat/util/net URL.java
> >>  Log:
> >>  Teach URL how to parse userInfo.
> >>
> >>  This allows URL to parse a string of the form:
> >>  ftp://user:pass@ftp.mycompany.com/
> >>
> >>  This actually doesn't fix any Tomcat problems (assuming that the
string
> >
> > is correct to start with), and this class is only used by TC33. I just
sleep
> > easier if the URL is parsed correctly.
> >
> >
> > I have no objection to applying this to o.a.c.u.URL (this is just a
> > re-packaged version of that class).  However, with Remy doing so many
> > releases, I thought I should ask before hacking the 4.x files. ;-)  Like
>
> Why's that ? Costin doesn't ask (and I don't complain about it) ;-)

Yeah, but this doesn't actually fix anything.  RFC 2396 states that the
'authority' is protocol specific (and nothing here changes 'authority').
This just allows parsing of what I think is the second most common
'authority'.

>
> > with 3.3 it seems that 4.x ignores the resulting (in the current code)
> > MalformedURLException (from the ':'), and passes on the original URL
string.
> > As such (like in 3.3) it doesn't "fix" anything functionally.
>
> A bug was filed related to that (bug 9846). It does appear to work in
4.1.x.
> I didn't try to look into why it was working though ;-)

9846 was why I looked at this at all.  I haven't looked at the 4.x code, but
I believe that this is one of the very few places that 3.3 and 4.x are doing
the same thing.  To make the URL absolute, it attempts to create an
o.a.c.u.URL with the input string.  When this throws a
MalformedURLException, it attempts to create it as a relative URL.  When
this one also throws a MalformedURLException, it simply uses the input
string un-modified.

>
> Remy
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message