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 16904 invoked by uid 98); 13 Jan 2003 14:45:00 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 16883 invoked from network); 13 Jan 2003 14:44:58 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 13 Jan 2003 14:44:58 -0000 Received: (qmail 57878 invoked by uid 500); 13 Jan 2003 14:43:37 -0000 Received: (qmail 57869 invoked from network); 13 Jan 2003 14:43:37 -0000 Received: from unknown (HELO KCCXOEX10.corp.kpmgconsulting.com) (57.80.136.6) by daedalus.apache.org with SMTP; 13 Jan 2003 14:43:37 -0000 Received: from kccxoex03.corp.kpmgconsulting.com ([57.80.136.6]) by KCCXOEX10.corp.kpmgconsulting.com with Microsoft SMTPSVC(5.0.2195.4905); Mon, 13 Jan 2003 14:44:15 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH]HttpMethodBase URI parse Date: Mon, 13 Jan 2003 14:43:32 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH]HttpMethodBase URI parse Thread-Index: AcK6ZplPn4o2C/JZQ4ilRxboWrM0GAAqM7BQAACn6IA= From: "Kalnichevski, Oleg" To: "Commons HttpClient Project" X-OriginalArrivalTime: 13 Jan 2003 14:44:15.0105 (UTC) FILETIME=[3E6ECF10:01C2BB12] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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=20 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 =3D 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=20 URIs will not be parsed correctly. The previous code was using=20 java.net.URL to parse the String URI and would fail if the protocol was=20 unknown to URL. Since the protocol values we use don't necessarily=20 have to correspond to those used by URL this code has been replaced by=20 the parsing code of URI. Enjoy, Mike -- To unsubscribe, e-mail: = For additional commands, e-mail: =