Return-Path: Delivered-To: apmail-ws-xmlrpc-dev-archive@www.apache.org Received: (qmail 89399 invoked from network); 30 Mar 2005 14:11:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Mar 2005 14:11:24 -0000 Received: (qmail 75201 invoked by uid 500); 30 Mar 2005 14:11:22 -0000 Delivered-To: apmail-ws-xmlrpc-dev-archive@ws.apache.org Received: (qmail 75163 invoked by uid 500); 30 Mar 2005 14:11:22 -0000 Mailing-List: contact xmlrpc-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: xmlrpc-dev@ws.apache.org Delivered-To: mailing list xmlrpc-dev@ws.apache.org Received: (qmail 75146 invoked by uid 99); 30 Mar 2005 14:11:22 -0000 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=FORGED_RCVD_HELO,PLING_QUERY,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of Andrew.Evers@redwood.com designates 80.126.27.148 as permitted sender) Received: from redwood.xs4all.nl (HELO gwnl.redwood.com) (80.126.27.148) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 30 Mar 2005 06:11:21 -0800 Received: from localhost (gwnl [127.0.0.1]) by gwnl.redwood.com (Postfix) with ESMTP id 894E213FCF for ; Wed, 30 Mar 2005 16:11:18 +0200 (CEST) Received: from gwnl.redwood.com ([127.0.0.1]) by localhost (gwnl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30031-03 for ; Wed, 30 Mar 2005 16:11:14 +0200 (CEST) Received: from EXCUK1.wokingham.uk.rw (excuk1 [10.44.1.10]) by gwnl.redwood.com (Postfix) with ESMTP id EC42313FA2 for ; Wed, 30 Mar 2005 16:11:13 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Using JIRA or Bugzilla?! X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Wed, 30 Mar 2005 15:11:20 +0100 Message-ID: <3E67A65D3F62A24CAB26D6EE241EC3E530BDAC@EXCUK1.wokingham.uk.rw> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Using JIRA or Bugzilla?! Thread-Index: AcU1MYhAr1pnfqcRT+qs4C1LneyEswAAIzfQ From: "Andrew Evers" To: X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at redwood.com X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi All, Since the link from the home page is to JIRA (and it seems to contain everything), I assume we are using JIRA. s/Bugzilla/JIRA/g Otherwise, previous comments apply. I will try to keep an eye on Bugzilla for 1.2 issues (since people still seem to be posting there), and look into getting Bugzilla made read-only (to move people to JIRA). Regards, Andrew. -----Original Message----- From: Siegfried Goeschl [mailto:siegfried.goeschl@it20one.at]=20 Sent: Wednesday, March 30, 2005 3:05 PM To: xmlrpc-dev@ws.apache.org Subject: Using JIRA or Bugzilla?! Hi Andrews, should JIRA or Bugzilla being used for patches and bugs?! Cheers, Siegfried Goeschl Andrew Evers wrote: >Hi Henri, > >I'm currently focusing on fixing up 1.2 (the stuff you saw on 2.0 was to >fix a bug, not to add a feature). I'm also not that au fait with the >CommonsHttpTransport stuff (that's Ryan's baby), so I am loathe to add >features without test cases. > >Can you provide some test cases that use your gzip functionality? > >Creating a bugzilla bug and attaching the patch and a test case to it is >a great way of making committer's lives easier (and getting your patch >accepted as a result ;).=20 >=20 >Regards, >=20 >Andrew. > >-----Original Message----- >From: Henri Gomez [mailto:henri.gomez@gmail.com]=20 >Sent: Wednesday, March 30, 2005 2:57 PM >To: xmlrpc-dev@ws.apache.org >Subject: Re: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc >CommonsXmlRpcTransport.java DefaultXmlRpcTransport.java >LiteXmlRpcTransport.java XmlRpc.java XmlRpcClientWorker.java >XmlRpcTransport.java > >What about adding my fixes to support gzip compression ? > > >On 30 Mar 2005 11:19:18 -0000, aevers@apache.org >wrote: > =20 > >>aevers 2005/03/30 03:19:18 >> >> Modified: src/java/org/apache/xmlrpc CommonsXmlRpcTransport.java >> DefaultXmlRpcTransport.java >> LiteXmlRpcTransport.java XmlRpc.java >> XmlRpcClientWorker.java XmlRpcTransport.java >> Log: >> Bug 20339: LiteXmlRpcTransport throws IOExcpetion 'socket closed' >> >> Fix general resource leaks regarding connections in client side >> transpot code. There is now an endClientRequest() in the >> XmlRpcTransport interface. Appropriate implementations have been >> filled in for all shipped transports. >> >> Passes all tests except Base64 (was already broken). Note, for >> tests to pass you must have commons-logging installed as >> it is used by commons-httpclient. >> >> PR: 20339 >> >> Revision Changes Path >> 1.3 +28 -10 >> =20 >> >ws-xmlrpc/src/java/org/apache/xmlrpc/CommonsXmlRpcTransport.java > =20 > >> Index: CommonsXmlRpcTransport.java >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: >> =20 >> >/home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/CommonsXmlRpcTransport.j a >va,v > =20 > >> retrieving revision 1.2 >> retrieving revision 1.3 >> diff -u -r1.2 -r1.3 >> --- CommonsXmlRpcTransport.java 26 Dec 2003 16:57:51 -0000 >> =20 >> >1.2 > =20 > >> +++ CommonsXmlRpcTransport.java 30 Mar 2005 11:19:18 -0000 >> =20 >> >1.3 > =20 > >> @@ -76,20 +76,28 @@ >> * @version $Id$ >> * @since 1.2 >> */ >> -public class CommonsXmlRpcTransport implements XmlRpcTransport { >> +public class CommonsXmlRpcTransport implements XmlRpcTransport >> +{ >> >> + protected PostMethod method; >> + >> /** Creates a new instance of CommonsXmlRpcTransport */ >> - public CommonsXmlRpcTransport(URL url, HttpClient client) { >> + public CommonsXmlRpcTransport(URL url, HttpClient client) >> + { >> this.url =3D url; >> - if (client =3D=3D null) { >> + if (client =3D=3D null) >> + { >> HttpClient newClient =3D new HttpClient(); >> this.client =3D newClient; >> - } else { >> + } >> + else >> + { >> this.client =3D client; >> } >> } >> >> - public CommonsXmlRpcTransport(URL url) { >> + public CommonsXmlRpcTransport(URL url) >> + { >> this(url, null); >> } >> >> @@ -98,8 +106,9 @@ >> private final Header userAgentHeader =3D new = Header("User-Agent", >> =20 >> >XmlRpc.version); > =20 > >> private boolean http11 =3D false; // defaults to HTTP 1.0 >> >> - public InputStream sendXmlRpc(byte[] request) throws >> =20 >> >IOException, XmlRpcClientException { > =20 > >> - PostMethod method =3D new PostMethod(url.toString()); >> + public InputStream sendXmlRpc(byte[] request) throws >> =20 >> >IOException, XmlRpcClientException > =20 > >> + { >> + method =3D new PostMethod(url.toString()); >> method.setHttp11(http11); >> method.setRequestHeader(new Header("Content-Type", >> =20 >> >"text/xml")); > =20 > >> method.setRequestHeader(userAgentHeader); >> @@ -112,11 +121,20 @@ >> return method.getResponseBodyAsStream(); >> } >> >> - public void setHttp11(boolean http11) { >> + public void setHttp11(boolean http11) >> + { >> this.http11 =3D http11; >> } >> >> - public void setUserAgent(String userAgent) { >> + public void setUserAgent(String userAgent) >> + { >> userAgentHeader.setValue(userAgent); >> } >> + >> + public void endClientRequest() >> + throws XmlRpcClientException >> + { >> + // Rlease connection resources >> + method.releaseConnection(); >> + } >> } >> >> 1.3 +16 -2 >> =20 >> >ws-xmlrpc/src/java/org/apache/xmlrpc/DefaultXmlRpcTransport.java > =20 > >> Index: DefaultXmlRpcTransport.java >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: >> =20 >> >/home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/DefaultXmlRpcTransport.j a >va,v > =20 > >> retrieving revision 1.2 >> retrieving revision 1.3 >> diff -u -r1.2 -r1.3 >> --- DefaultXmlRpcTransport.java 29 Jan 2003 00:46:37 -0000 >> =20 >> >1.2 > =20 > >> +++ DefaultXmlRpcTransport.java 30 Mar 2005 11:19:18 -0000 >> =20 >> >1.3 > =20 > >> @@ -75,6 +75,7 @@ >> { >> protected URL url; >> protected String auth; >> + protected URLConnection con; >> >> /** >> * Create a new DefaultXmlRpcTransport with the specified URL >> =20 >> >and basic > =20 > >> @@ -104,7 +105,7 @@ >> public InputStream sendXmlRpc(byte [] request) >> throws IOException >> { >> - URLConnection con =3D url.openConnection(); >> + con =3D url.openConnection(); >> con.setDoInput(true); >> con.setDoOutput(true); >> con.setUseCaches(false); >> @@ -133,4 +134,17 @@ >> { >> auth =3D HttpUtil.encodeBasicAuthentication(user, = password); >> } >> + >> + public void endClientRequest() >> + throws XmlRpcClientException >> + { >> + try >> + { >> + con.getInputStream().close(); >> + } >> + catch (Exception e) >> + { >> + throw new XmlRpcClientException("Exception closing >> =20 >> >URLConnection", e); > =20 > >> + } >> + } >> } >> >> 1.4 +10 -7 >> =20 >> >ws-xmlrpc/src/java/org/apache/xmlrpc/LiteXmlRpcTransport.java > =20 > >> Index: LiteXmlRpcTransport.java >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: >> =20 >> >/home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/LiteXmlRpcTransport.java , >v > =20 > >> retrieving revision 1.3 >> retrieving revision 1.4 >> diff -u -r1.3 -r1.4 >> --- LiteXmlRpcTransport.java 1 May 2003 16:53:15 -0000 1.3 >> +++ LiteXmlRpcTransport.java 30 Mar 2005 11:19:18 -0000 1.4 >> @@ -147,12 +147,6 @@ >> } >> } >> >> - // eepalive is always false if XmlRpc.keepalive is >> =20 >> >false > =20 > >> - if (!keepalive) >> - { >> - closeConnection (); >> - } >> - >> return in; >> } >> catch (IOException iox) >> @@ -326,6 +320,15 @@ >> auth =3D HttpUtil.encodeBasicAuthentication(user, = password); >> } >> >> + public void endClientRequest() >> + { >> + // eepalive is always false if XmlRpc.keepalive is false >> + if (!keepalive) >> + { >> + closeConnection (); >> + } >> + } >> + >> /** >> * >> * @return >> >> 1.38 +41 -2 >> =20 >> >ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java > =20 > >> Index: XmlRpc.java >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: >> =20 >> >/home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java,v > =20 > >> retrieving revision 1.37 >> retrieving revision 1.38 >> diff -u -r1.37 -r1.38 >> --- XmlRpc.java 30 Jun 2004 06:11:55 -0000 1.37 >> +++ XmlRpc.java 30 Mar 2005 11:19:18 -0000 1.38 >> @@ -56,6 +56,7 @@ >> */ >> >> import java.io.InputStream; >> +import java.io.InputStreamReader; >> import java.util.Hashtable; >> import java.util.Stack; >> import java.util.Vector; >> @@ -188,6 +189,15 @@ >> */ >> static String encoding =3D XmlWriter.ISO8859_1; >> >> + /** >> + * Java's name for the input encoding we're using. Defaults to >> + * null, signifying the platform default. This may >> + * need to be overridden on platforms where the default >> =20 >> >encoding > =20 > >> + * is not compatible with ASCII (eg. EBCDIC) but the network is >> + * still ASCII-like. >> + */ >> + static String inputEncoding =3D null; >> + >> private TypeFactory typeFactory; >> >> /** >> @@ -342,6 +352,28 @@ >> } >> >> /** >> + * Set the input encoding of the XML. >> + * This is used only if set. >> + * >> + * @param enc The Java name of the encoding. >> + */ >> + public static void setInputEncoding(String enc) >> + { >> + inputEncoding =3D enc; >> + } >> + >> + /** >> + * Return the input encoding. This may be null. This is always >> =20 >> >a > =20 > >> + * Java encoding name, it is not transformed. >> + * >> + * @return the Java encoding name to use, if set, otherwise >> =20 >> >null. > =20 > >> + */ >> + public static String getInputEncoding () >> + { >> + return inputEncoding; >> + } >> + >> + /** >> * Gets the maximum number of threads used at any given moment. >> */ >> public static int getMaxThreads() >> @@ -440,7 +472,14 @@ >> } >> try >> { >> - parser.parse(new InputSource (is)); >> + if(inputEncoding =3D=3D null) >> + { >> + parser.parse(new InputSource (is)); >> + } >> + else >> + { >> + parser.parse( new InputSource( new >> =20 >> >InputStreamReader(is, inputEncoding))); > =20 > >> + } >> } >> finally >> { >> >> 1.2 +8 -0 >> =20 >> >ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpcClientWorker.java > =20 > >> Index: XmlRpcClientWorker.java >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: >> =20 >> >/home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpcClientWorker.java, v > =20 > >> retrieving revision 1.1 >> retrieving revision 1.2 >> diff -u -r1.1 -r1.2 >> --- XmlRpcClientWorker.java 5 Dec 2002 08:49:24 -0000 1.1 >> +++ XmlRpcClientWorker.java 30 Mar 2005 11:19:18 -0000 1.2 >> @@ -136,6 +136,14 @@ >> System.out.println("Spent " + >> =20 >> >(System.currentTimeMillis() - now) > =20 > >> + " millis in >> =20 >> >request/process/response"); > =20 > >> } >> + try >> + { >> + transport.endClientRequest(); >> + } >> + catch (RuntimeException re) >> + { >> + throw new XmlRpcClientException("Transport >> =20 >> >exception in endClientRequest()", re); > =20 > >> + } >> } >> } >> >> 1.2 +19 -1 >> =20 >> >ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpcTransport.java > =20 > >> Index: XmlRpcTransport.java >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: >> =20 >> >/home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpcTransport.java,v > =20 > >> retrieving revision 1.1 >> retrieving revision 1.2 >> diff -u -r1.1 -r1.2 >> --- XmlRpcTransport.java 5 Dec 2002 08:49:24 -0000 1.1 >> +++ XmlRpcTransport.java 30 Mar 2005 11:19:18 -0000 1.2 >> @@ -68,6 +68,24 @@ >> */ >> public interface XmlRpcTransport >> { >> + /** >> + * Send an XML-RPC message. This method is called to send a >> =20 >> >message to the > =20 > >> + * other party. >> + * >> + * @param request the request in network encoding. >> + * >> + * @throws IOException if an IOException occurs in the IO level >> =20 >> >of the transport. > =20 > >> + * @throws XmlRpcClientException if an exception occurs in the >> =20 >> >transport. > =20 > >> + */ >> public InputStream sendXmlRpc(byte [] request) >> throws IOException, XmlRpcClientException; >> + >> + /** >> + * End an XML-RPC request. This method is called by the >> =20 >> >XmlRpcClient when then > =20 > >> + * request has been sent and the response (or an exception) >> =20 >> >recieved. > =20 > >> + * >> + * @throws XmlRpcClientException if an exception occurs in the >> =20 >> >transport. > =20 > >> + */ >> + public void endClientRequest() >> + throws XmlRpcClientException; >> } >> >> >> =20 >> > > =20 >