hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: [PATCH]HttpMethodBase URI parse
Date Mon, 13 Jan 2003 15:06:53 GMT
Sounds like a good strategy.  I'll take this line out and resubmit this 
evening.

Mike

Kalnichevski, Oleg wrote:
> Mike,
> 
> 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
> 
> Cheers
> 
> Oleg
> 
> -----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");
> 
> Cheers
> 
> Oleg
> 
> 
> -----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.
> 
> Enjoy,
> 
> Mike
> 
> 
> --
> 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>
> 
> 
> --
> 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>
> 


Mime
View raw message