hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: [PATCH]HttpMethodBase URI parse
Date Mon, 13 Jan 2003 14:43:32 GMT

One more thing. I personally refrain from logging and re-throwing exception in the same method,
as I believe it unnecessarily pollutes the logs with duplicate error messages. In my opinion
the exception should be logged (or ignored) on the level where it is processed and discarded.
Tastes differ, though



-----Original Message-----
From: Kalnichevski, Oleg 
Sent: Monday, January 13, 2003 3:32 PM
To: Commons HttpClient Project
Subject: RE: [PATCH]HttpMethodBase URI parse

Hi Mike

Your patch looks fine to me. What I do not quite like is that the use of invalid protocols
currently results in an InvalidStateException runtime exception. I believe it should be caught
and rethrown as an application exception (probably HttpException or its super class). Do you
mind adding a few test cases as well that would help test behaviour of the HttpMethodBase.HttpMethodBase(String
uri) constructor in case of invalid URI passed as input parameter?

GetMethod httpget = new GetMethod("crap://localhost");



-----Original Message-----
From: Michael Becke [mailto:becke@u.washington.edu]
Sent: Sunday, January 12, 2003 7:15 PM
To: Commons Project
Subject: [PATCH]HttpMethodBase URI parse

Attached is a patch that fixes a problem with HttpMethodBase where some 
URIs will not be parsed correctly.  The previous code was using 
java.net.URL to parse the String URI and would fail if the protocol was 
unknown to URL.  Since the protocol values we use don't necessarily 
have to correspond to those used by URL this code has been replaced by 
the parsing code of URI.



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

View raw message