From xmlrpccarrricky@example.org Fri Jul 01 09:34:35 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 83820 invoked from network); 1 Jul 2005 09:34:34 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 1 Jul 2005 09:34:34 -0000
Received: (qmail 65912 invoked by uid 500); 1 Jul 2005 09:34:08 -0000
Delivered-To: carrricky@example.org
Received: (qmail 65696 invoked by uid 500); 1 Jul 2005 09:34:07 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 65634 invoked by uid 99); 1 Jul 2005 09:34:06 -0000
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2005 02:34:06 -0700
Received: from ajax.apache.org (ajax.apache.org [83.161.120.155])
	by ajax.apache.org (Postfix) with ESMTP id 831DA15
	for <carrricky@example.org>; Fri,  1 Jul 2005 11:34:03 +0200 (CEST)
Message-ID: <carrricky@example.org>
Date: Fri, 1 Jul 2005 11:34:03 +0200 (CEST)
From: "Andreas Sahlbach (JIRA)" <carrricky@example.org>
To: carrricky@example.org
Subject: [jira] Created: (XMLRPC-64) DefaultXmlRpcTransportFactory forgets authentication setting when using http
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

DefaultXmlRpcTransportFactory forgets authentication setting when using http
----------------------------------------------------------------------------

         Key: XMLRPC-64
         URL: http://issues.apache.org/jira/browse/XMLRPC-64
     Project: XML-RPC
        Type: Bug
  Components: Source  
    Versions: 2.0    
    Reporter: Andreas Sahlbach


We normally use XMLRPC via SSL. But for interprocess communication from webapp to webapp on the same server we use a normal HTTP port (bound only to localhost, so we can skip the SSL overhead). The XMLRPC port is secured via Basic Authentication in both cases.

I am setting the authentication at the client by creating a DefaultXmlRpcTransportFactory, setting the authentication at it and deliver it when I am creating the XMLRPC client. The problem is, that if the URL is http, no authentication was sent. If I just change the URL to https, the authentication was used.

After some debugging it boild

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


From xmlrpccarrricky@example.org Fri Jul 01 09:45:09 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 90203 invoked from network); 1 Jul 2005 09:45:08 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 1 Jul 2005 09:45:08 -0000
Received: (qmail 96758 invoked by uid 500); 1 Jul 2005 09:45:03 -0000
Delivered-To: carrricky@example.org
Received: (qmail 96658 invoked by uid 500); 1 Jul 2005 09:45:03 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 96503 invoked by uid 99); 1 Jul 2005 09:45:01 -0000
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2005 02:45:01 -0700
Received: from ajax.apache.org (ajax.apache.org [83.161.120.155])
	by ajax.apache.org (Postfix) with ESMTP id A2D1E16
	for <carrricky@example.org>; Fri,  1 Jul 2005 11:44:58 +0200 (CEST)
Message-ID: <carrricky@example.org>
Date: Fri, 1 Jul 2005 11:44:58 +0200 (CEST)
From: "Andreas Sahlbach (JIRA)" <carrricky@example.org>
To: carrricky@example.org
Subject: [jira] Commented: (XMLRPC-64) DefaultXmlRpcTransportFactory forgets authentication setting when using http
In-Reply-To: <carrricky@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

    [ http://issues.apache.org/jira/browse/XMLRPC-64?page=comments#action_12314879 ] 

Andreas Sahlbach commented on XMLRPC-64:
----------------------------------------

Ok, I wasn't done yet, obviously, but I accidently hit the darn enter key... Here comes the rest:

After some debugging it boiled down to the following function in DefaultXmlRpcTransportFactory:
=============================================================
public XmlRpcTransport createTransport() throws XmlRpcClientException
    {
        if ("https".equals(url.getProtocol()))
        {
            if (httpsTransportFactory == null)
            {
                Properties properties = new Properties();

                properties.put(XmlRpcTransportFactory.TRANSPORT_URL, url);
                properties.put(XmlRpcTransportFactory.TRANSPORT_AUTH, auth);

                setHTTPSTransport(DEFAULT_HTTPS_PROVIDER, properties);
            }

            return httpsTransportFactory.createTransport();
        }

        return new DefaultXmlRpcTransport(url);    // <---- should be new DefaultXmlRpcTransport(url,auth) IMHO, a.sahlbach
    }
=================================================================
As you can see the function creates a DefaultXmlRpcTransport, if it is not SSL. Problem is, that it is not providing the authentication to this DefaultXmlRpcTransport, so that it is created without Authentication settings. See comment above for a possible patch.



> DefaultXmlRpcTransportFactory forgets authentication setting when using http
> ----------------------------------------------------------------------------
>
>          Key: XMLRPC-64
>          URL: http://issues.apache.org/jira/browse/XMLRPC-64
>      Project: XML-RPC
>         Type: Bug
>   Components: Source
>     Versions: 2.0
>     Reporter: Andreas Sahlbach

>
> We normally use XMLRPC via SSL. But for interprocess communication from webapp to webapp on the same server we use a normal HTTP port (bound only to localhost, so we can skip the SSL overhead). The XMLRPC port is secured via Basic Authentication in both cases.
> I am setting the authentication at the client by creating a DefaultXmlRpcTransportFactory, setting the authentication at it and deliver it when I am creating the XMLRPC client. The problem is, that if the URL is http, no authentication was sent. If I just change the URL to https, the authentication was used.
> After some debugging it boild

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


From xmlrpccarrricky@example.org Wed Jul 06 09:52:26 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 59964 invoked from network); 6 Jul 2005 09:52:26 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 6 Jul 2005 09:52:26 -0000
Received: (qmail 31858 invoked by uid 500); 6 Jul 2005 09:52:24 -0000
Delivered-To: carrricky@example.org
Received: (qmail 31831 invoked by uid 500); 6 Jul 2005 09:52:23 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 31818 invoked by uid 99); 6 Jul 2005 09:52:23 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2005 02:52:23 -0700
X-ASF-Spam-Status: No, hits=0.5 required=10.0
	tests=HTML_20_30,HTML_MESSAGE,RCVD_BY_IP
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2005 02:52:23 -0700
Received: by nproxy.gmail.com with SMTP id g2so257182nfe
        for <carrricky@example.org>; Wed, 06 Jul 2005 02:52:18 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type;
        b=BeE0cGzqCv7QS1YU3SsNnFGo+QJnAxlyRlbfmda1VKwQNUadWEz94h11NDrUY8uzSDV3ub3c2wuY+VkXwgnoBAZEZcxotidmOa4Km4bJNn9upvSKyOcjBt1NGl2GTKAcNL8QYPVxSnzctNsUrKxIJhwYshwwvJPNcUT7EyIevMI=
Received: by 83.161.120.155 with SMTP id n7mr177736nfh;
        Wed, 06 Jul 2005 02:52:18 -0700 (PDT)
Received: by 83.161.120.155 with HTTP; Wed, 6 Jul 2005 02:52:18 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Wed, 6 Jul 2005 11:52:18 +0200
From: Nicolas Hoibian <carrricky@example.org>
Reply-To: Nicolas Hoibian <carrricky@example.org>
To: carrricky@example.org
Subject: xmlrpc2.0.jar requires common-codecs at runtime
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_14186_10196528.1120643538061"
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

------=_Part_14186_10196528.1120643538061
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello !

I've just switched to xmlrpc 2.0 , from 1.2beta.

I'm getting this error when i tried to launch an xmlrpc client . The server=
=20
works fine until it process a xmlrpc request.

java.lang.NoClassDefFoundError: carrricky@example.org(XmlRpc.java:238)
at org.apache.xmlrpc.XmlRpc.<init>(XmlRpc.java:193)
at org.apache.xmlrpc.XmlRpcClientResponseProcessor.<init>(
XmlRpcClientResponseProcessor.java:48)
at org.apache.xmlrpc.XmlRpcClientWorker.<init>(XmlRpcClientWorker.java:43)
at org.apache.xmlrpc.XmlRpcClient.getWorker(XmlRpcClient.java:347)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:190)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:184)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:177)
at WSClient.main(WSClient.java:95)

(line 95 is : Integer result =3D (Integer) xmlrpc.execute("add",v2);
So I imported the commons-codec lib (as a jar, like xmlrpc) from apache and=
=20
then it worked fine.
But it's not written in the Readme.

I think that the jar should be rebuild with commons-codecs in it or that=20
this dep should at least be put in the Readme.

regards.

Nicolas.

------=_Part_14186_10196528.1120643538061--

From xmlrpccarrricky@example.org Wed Jul 06 11:07:38 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 90683 invoked from network); 6 Jul 2005 11:07:37 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 6 Jul 2005 11:07:37 -0000
Received: (qmail 59907 invoked by uid 500); 6 Jul 2005 11:07:31 -0000
Delivered-To: carrricky@example.org
Received: (qmail 59835 invoked by uid 500); 6 Jul 2005 11:07:30 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 59779 invoked by uid 99); 6 Jul 2005 11:07:30 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2005 04:07:30 -0700
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=RCVD_BY_IP
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2005 04:07:30 -0700
Received: by nproxy.gmail.com with SMTP id g2so262766nfe
        for <carrricky@example.org>; Wed, 06 Jul 2005 04:07:25 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=RA6kv2b0onkTIvPqqWunKKnEAiFBF7ja1pcEgP58tgHg359ObHX91bC3v+mXbnaTGEnuHrF6t8RCBTcTKsqprZ/Nvn1SrnKQPI/g6WbQtHC9kM2ckcZr0Lc9A9pP6Tcnsa0SyPlxXPs6vZLBRN1AZc1TmJ9B8vwtIZvvZzBp0fI=
Received: by 83.161.120.155 with SMTP id r19mr181291nfh;
        Wed, 06 Jul 2005 04:07:25 -0700 (PDT)
Received: by 83.161.120.155 with HTTP; Wed, 6 Jul 2005 04:07:25 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Wed, 6 Jul 2005 13:07:25 +0200
From: Jochen Wiedmann <carrricky@example.org>
Reply-To: Jochen Wiedmann <carrricky@example.org>
To: carrricky@example.org, Nicolas Hoibian <carrricky@example.org>
Subject: Re: xmlrpc2.0.jar requires common-codecs at runtime
In-Reply-To: <carrricky@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
References: <carrricky@example.org>
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

On 7/6/05, Nicolas Hoibian <carrricky@example.org> wrote:

> I think that the jar should be rebuild with commons-codecs in it or that
> this dep should at least be put in the Readme.

Thank you for the hint. I suggest that you create patch (preferred) or
a revised version of the README and put that into a bug report in
Jira. If so, I'll add it later.


Jochen

--=20
What are the first steps on the moon, compared to your child's?

From xmlrpccarrricky@example.org Mon Jul 11 08:01:11 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 49400 invoked from network); 11 Jul 2005 08:01:10 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 11 Jul 2005 08:01:10 -0000
Received: (qmail 79769 invoked by uid 500); 11 Jul 2005 08:01:08 -0000
Delivered-To: carrricky@example.org
Received: (qmail 79750 invoked by uid 500); 11 Jul 2005 08:01:08 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 79737 invoked by uid 500); 11 Jul 2005 08:01:07 -0000
Delivered-To: carrricky@example.org
Received: (qmail 79734 invoked by uid 99); 11 Jul 2005 08:01:07 -0000
X-ASF-Spam-Status: No, hits=-9.8 required=10.0
	tests=ALL_TRUSTED,NO_REAL_NAME
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Mon, 11 Jul 2005 01:00:56 -0700
Received: (qmail 49320 invoked by uid 1113); 11 Jul 2005 08:00:54 -0000
Date: 11 Jul 2005 08:00:54 -0000
Message-ID: <carrricky@example.org>
From: carrricky@example.org
To: carrricky@example.org
Subject: cvs commit: ws-xmlrpc README.txt
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

jochen      2005/07/11 01:00:54

  Modified:    .        Tag: XMLRPC_2_0_BRANCH README.txt
  Log:
  Added hint for required commons-codec jar file to the README
  Submitted by: Nicolas Hoibian, carrricky@example.org
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  83.161.120.155   +4 -0      ws-xmlrpc/README.txt
  
  Index: README.txt
  ===================================================================
  RCS file: /home/cvs/ws-xmlrpc/README.txt,v
  retrieving revision 1.6
  retrieving revision 83.161.120.155
  diff -u -r1.6 -r83.161.120.155
  --- README.txt	15 Apr 2005 14:04:50 -0000	1.6
  +++ README.txt	11 Jul 2005 08:00:53 -0000	83.161.120.155
  @@ -18,6 +18,10 @@
   --------------------------------------------------------------------------
   R E Q U I R E M E N T S
   --------------------------------------------------------------------------
  + 
  +To run code using XMLRPC you need to have the commons-codec jar (1.3 works)
  +in your CLASSPATH. You can get it at
  +    http://jakarta.apache.org/commons/codec/index.html
   
   To build the XmlRpc package, you need to have Ant (and JDK 1.2+) installed
   (http://jakarta.apache.org/ant/).  Execute "ant -help" from this directory
  
  
  

From xmlrpccarrricky@example.org Mon Jul 11 08:01:17 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 49457 invoked from network); 11 Jul 2005 08:01:17 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 11 Jul 2005 08:01:17 -0000
Received: (qmail 79981 invoked by uid 500); 11 Jul 2005 08:01:16 -0000
Delivered-To: carrricky@example.org
Received: (qmail 79963 invoked by uid 500); 11 Jul 2005 08:01:16 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 79950 invoked by uid 500); 11 Jul 2005 08:01:15 -0000
Delivered-To: carrricky@example.org
Received: (qmail 79946 invoked by uid 99); 11 Jul 2005 08:01:15 -0000
X-ASF-Spam-Status: No, hits=-9.8 required=10.0
	tests=ALL_TRUSTED,NO_REAL_NAME
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Mon, 11 Jul 2005 01:01:04 -0700
Received: (qmail 49354 invoked by uid 1113); 11 Jul 2005 08:01:02 -0000
Date: 11 Jul 2005 08:01:02 -0000
Message-ID: <carrricky@example.org>
From: carrricky@example.org
To: carrricky@example.org
Subject: cvs commit: ws-xmlrpc README.txt
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

jochen      2005/07/11 01:01:02

  Modified:    .        README.txt
  Log:
  Added hint for required commons-codec jar file to the README
  Submitted by: Nicolas Hoibian, carrricky@example.org
  
  Revision  Changes    Path
  1.7       +4 -0      ws-xmlrpc/README.txt
  
  Index: README.txt
  ===================================================================
  RCS file: /home/cvs/ws-xmlrpc/README.txt,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- README.txt	15 Apr 2005 14:04:50 -0000	1.6
  +++ README.txt	11 Jul 2005 08:01:02 -0000	1.7
  @@ -18,6 +18,10 @@
   --------------------------------------------------------------------------
   R E Q U I R E M E N T S
   --------------------------------------------------------------------------
  + 
  +To run code using XMLRPC you need to have the commons-codec jar (1.3 works)
  +in your CLASSPATH. You can get it at
  +    http://jakarta.apache.org/commons/codec/index.html
   
   To build the XmlRpc package, you need to have Ant (and JDK 1.2+) installed
   (http://jakarta.apache.org/ant/).  Execute "ant -help" from this directory
  
  
  

From xmlrpccarrricky@example.org Mon Jul 11 08:02:04 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 49768 invoked from network); 11 Jul 2005 08:02:04 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 11 Jul 2005 08:02:04 -0000
Received: (qmail 80612 invoked by uid 500); 11 Jul 2005 08:02:02 -0000
Delivered-To: carrricky@example.org
Received: (qmail 80582 invoked by uid 500); 11 Jul 2005 08:02:02 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 80568 invoked by uid 99); 11 Jul 2005 08:02:02 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2005 01:02:02 -0700
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2005 01:01:59 -0700
Received: by nproxy.gmail.com with SMTP id c2so185269nfe
        for <carrricky@example.org>; Mon, 11 Jul 2005 01:01:58 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=kqsfmjHSTvC/5gvE+ugog23eo0hrA6x9SJd0MVeLJ95+C7gawpouoVvQrfdh5LWGwCblXwoj0DwpnQDZUSqgE5sLgVieNnMU/K/nTaJ6ghvE7hoKu+sRVis0DHZySq6U+tIQM04hCLNCo5QNyXnE/l+nU0OEC/PreMd7rpPl9AU=
Received: by 83.161.120.155 with SMTP id 10mr126327nfd;
        Mon, 11 Jul 2005 01:01:58 -0700 (PDT)
Received: by 83.161.120.155 with HTTP; Mon, 11 Jul 2005 01:01:58 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Mon, 11 Jul 2005 10:01:58 +0200
From: Jochen Wiedmann <carrricky@example.org>
Reply-To: Jochen Wiedmann <carrricky@example.org>
To: Nicolas Hoibian <carrricky@example.org>, carrricky@example.org
Subject: Re: xmlrpc2.0.jar requires common-codecs at runtime
In-Reply-To: <carrricky@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
References: <carrricky@example.org>
	 <carrricky@example.org>
	 <carrricky@example.org>
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

Applied to both HEAD and 2.0 branch. Please be so kind to send future
patches to the mailing list and not to me directly. Otherwise, the
possibility is high that it gets lost.

Jochen

On 7/11/05, Nicolas Hoibian <carrricky@example.org> wrote:
>=20
>=20
> 2005/7/6, Jochen Wiedmann <carrricky@example.org>:
> >=20
> >=20
> > Thank you for the hint. I suggest that you create patch (preferred) or
> > a revised version of the README and put that into a bug report in
> > Jira. If so, I'll add it later.
> >=20
> >=20
> > Jochen
> This is my first patch, so i don't exactly know how to do do it.=20
>  diff -u :
>  --- README.txt    2005-05-25 22:46:08.000000000 +0200
>  +++ modiff/README.txt    2005-07-11 09:33:29.717516800 +0200
>  @@ -19,6 +19,10 @@
>   R E Q U I R E M E N T S
> =20
> -------------------------------------------------------------------------=
-
>  =20
>  +To run code using XMLRPC you need to have the commons-codec jar (1.3
> works)
>  +in your CLASSPATH.=20
>  +You can get it at
> http://jakarta.apache.org/commons/codec/index.html
>  +
>   To build the XmlRpc package, you need to have Ant (and JDK 1.2+) instal=
led
>   (http://jakarta.apache.org/ant/).  Execute "ant -help" from this direct=
ory
>   to get basic help or just "ant" to build the jars.
>  =20
> hope it helps
> =20
>  Nicolas.
> =20


--=20
What are the first steps on the moon, compared to your child's?

From xmlrpccarrricky@example.org Wed Jul 13 09:18:40 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 50220 invoked from network); 13 Jul 2005 09:18:39 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 13 Jul 2005 09:18:39 -0000
Received: (qmail 52083 invoked by uid 500); 13 Jul 2005 09:18:34 -0000
Delivered-To: carrricky@example.org
Received: (qmail 51853 invoked by uid 500); 13 Jul 2005 09:18:33 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 51740 invoked by uid 99); 13 Jul 2005 09:18:32 -0000
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=SPF_FAIL
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2005 02:18:18 -0700
Received: from ajax.apache.org (ajax.apache.org [83.161.120.155])
	by ajax.apache.org (Postfix) with ESMTP id A4289D6
	for <carrricky@example.org>; Wed, 13 Jul 2005 11:18:15 +0200 (CEST)
Message-ID: <carrricky@example.org>
Date: Wed, 13 Jul 2005 11:18:15 +0200 (CEST)
From: "Oded Arbel (JIRA)" <carrricky@example.org>
To: carrricky@example.org
Subject: [jira] Created: (XMLRPC-65) HTTP Basic Authentication is unusable
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

HTTP Basic Authentication is unusable
-------------------------------------

         Key: XMLRPC-65
         URL: http://issues.apache.org/jira/browse/XMLRPC-65
     Project: XML-RPC
        Type: Bug
  Components: Releases, Source  
    Versions: 2.0    
    Reporter: Oded Arbel


XmlRpcClient support for HTTP Basic Authentication is unusable.
Apparently while calling XmlRpcClient.setBasicAuthentication() still works, it is deprecated and there is no simple alternative to use.

The only other option is to create a DefaultXmlRpcTransportFactory, calling setBasicAuthentication() on it, and the passing it in the constructor to XmlRpcClient. this is bad for two reasons:
1) the URL has to be specified twice - once in the c'tor of the factory and once in the c'tor of the client.
2) It doesn't work - DefaultXmlRpcTransportFactory is broken and when using non-SSL connections, it does not initialize created transports with the basic authentication information (one reason is probably that the transport's c'tor that takes encoded basic auth is deprecated and as the factory saves auth information encoded, it has no way of providing it to the transport).

Currently the only way I can make it work is to subclass DefaultXmlRpcTransportFactory and implement my own createTransport() call that calls setBasicAuthentication() on the created transport using externally stored auth info. This is undocumented and incredibly clanky.

Possible Solutions:
a) undeprecate XmlRpcClient.setBasicAuthentication(). 
I don't see any reason not to let it work by doing what it currently does when no factory is supplied. If the user has supplied a factory then either XmlRpcClient can call setBasicAuthentication() on the factory or createed transport with the stored credentials (unlike factory, client stores the unencoded credentials), or it can just do what it currently does in that case (i.e. nothing) and assume that the provided factory knows how to setBasicAuthentication() properly
b) Fix DefaultXmlRpcTransportFactory by storing the unencoded credentials and calling setBasicAuthentination() on the created transport before returning it.
c) undeprecate the XmlRpcTransport c'tor that takes encoded auth info and let DefaultXmlRpcTransportFactory use that to construct transports.

Also, either a+b or a+c can be implemented.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


From xmlrpccarrricky@example.org Mon Jul 25 18:12:59 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 17462 invoked from network); 25 Jul 2005 18:12:59 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 25 Jul 2005 18:12:59 -0000
Received: (qmail 32773 invoked by uid 500); 25 Jul 2005 18:12:58 -0000
Delivered-To: carrricky@example.org
Received: (qmail 32743 invoked by uid 500); 25 Jul 2005 18:12:57 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 32730 invoked by uid 99); 25 Jul 2005 18:12:57 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 11:12:57 -0700
X-ASF-Spam-Status: No, hits=1.2 required=10.0
	tests=PRIORITY_NO_NAME,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO mail.gmx.net) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Mon, 25 Jul 2005 11:12:50 -0700
Received: (qmail invoked by alias); 25 Jul 2005 18:12:53 -0000
Received: from M2473P003.adsl.highway.telekom.at (EHLO M2473P003.adsl.highway.telekom.at) [83.161.120.155]
  by mail.gmx.net (mp029) with SMTP; 25 Jul 2005 20:12:53 +0200
X-Authenticated: #16336033
Date: Mon, 25 Jul 2005 20:18:18 +0200
From: Christoph Theis <carrricky@example.org>
Reply-To: Christoph Theis <carrricky@example.org>
X-Priority: 3 (Normal)
Message-ID: <carrricky@example.org>
To: carrricky@example.org
Subject: Bug in MinML?
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N


Hello!


I guess I encountered a bug in the MinML parser:

When the parser checks for endCDATA, it will check for two ']'
followed by a '>'. If that is not the case it will write 3 characters,
the two '>' and the offending character to the buffer. In that state
it might overwrite the next characters to read.

As an example consider the sequence "]]+:".
When reading the '+' the parser determines that it is not end of CDATA
and will write ']', ']' and '+' to the buffer. Now it could happen
that when reading the '+' the parser is at the end of the read buffer
(nextIn == lastIn) and will flush the buffer setting count = 0 and
nextIn = 1. Writing the reamining characters will now overwrite nextIn,
that is the ':' with second ']'. So write has to check if count is
still less than nextIn.

In MinML$MinMLBuffer an implementation for write would be, assuming
that nextIn will never be 0.

    public void write(final int c) throws IOException {
      // flush if there is not enough space for the character
      if (written && count == nextIn)
          _flush();
      
      written = true;
      chars[count++] = (char)c;
    }

    public void write(final char[] cbuf, final int off, final int len) throws IOException {
      // flush if there is not enough space for the array
      if (written && (count + len) >= nextIn)
          _flush();
          
      // Write single characters if there is still not enough space
      if (count + len >= nextIn) {
         for (int i = 0; i < len; i++)
             write(cbuf[off+i]);
         return;
      }
      
      written = true;
      System.arraycopy(cbuf, off, chars, count, len);
      count += len;
    }


Sorry I can't give you a diff context since I changed more than that in MinML
(I had to determine the enconding of the XML file).


Regards

Christoph Theis


From xmlrpccarrricky@example.org Mon Jul 25 20:33:16 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 8881 invoked from network); 25 Jul 2005 20:33:16 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 25 Jul 2005 20:33:16 -0000
Received: (qmail 8753 invoked by uid 500); 25 Jul 2005 20:06:36 -0000
Delivered-To: carrricky@example.org
Received: (qmail 8733 invoked by uid 500); 25 Jul 2005 20:06:36 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 8719 invoked by uid 99); 25 Jul 2005 20:06:35 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 13:06:35 -0700
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO rproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 13:06:28 -0700
Received: by rproxy.gmail.com with SMTP id a41so534723rng
        for <carrricky@example.org>; Mon, 25 Jul 2005 13:06:30 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding;
        b=oN/ZSRExGYg7S2tNDqOaoUPxmwbqSQosr+9TMPlOL3v1r1BADxV3WBgK0vKW2BIhtSRMzakHy6O20ZZWC+FNw/AUK7S1VquMTQmll25G/ZEXCvb2GQjKBOwunmgPu0g6hYynB1NrvVV1vVBVHEK6T/sbwIhzf4Owecmwb7nIIrQ=
Received: by 83.161.120.155 with SMTP id 37mr1725807rnj;
        Mon, 25 Jul 2005 13:06:30 -0700 (PDT)
Received: from ?83.161.120.155? ([83.161.120.155])
        by mx.gmail.com with ESMTP id 79sm4969677rna.283.161.120.155.06.29;
        Mon, 25 Jul 2005 13:06:30 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Mon, 25 Jul 2005 22:06:45 +0200
From: Jochen Wiedmann <carrricky@example.org>
User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:  carrricky@example.org
Subject: Re: Bug in MinML?
References: <carrricky@example.org>
In-Reply-To: <carrricky@example.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

Christoph Theis wrote:

> Sorry I can't give you a diff context since I changed more than that in MinML
> (I had to determine the enconding of the XML file).

Christoph,

please be so kind to create a context diff anyways. Obviously, you know 
the sources much better than I and most other committers do, so you'll 
help us a real lot.


Regards,

Jochen

From xmlrpccarrricky@example.org Mon Jul 25 20:37:19 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 10957 invoked from network); 25 Jul 2005 20:37:18 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 25 Jul 2005 20:37:18 -0000
Received: (qmail 60104 invoked by uid 500); 25 Jul 2005 20:37:17 -0000
Delivered-To: carrricky@example.org
Received: (qmail 60080 invoked by uid 500); 25 Jul 2005 20:37:16 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 60067 invoked by uid 99); 25 Jul 2005 20:37:16 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 13:37:16 -0700
X-ASF-Spam-Status: No, hits=1.2 required=10.0
	tests=PRIORITY_NO_NAME,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO mail.gmx.net) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Mon, 25 Jul 2005 13:37:09 -0700
Received: (qmail invoked by alias); 25 Jul 2005 20:37:13 -0000
Received: from M2473P003.adsl.highway.telekom.at (EHLO M2473P003.adsl.highway.telekom.at) [83.161.120.155]
  by mail.gmx.net (mp004) with SMTP; 25 Jul 2005 22:37:13 +0200
X-Authenticated: #16336033
Date: Mon, 25 Jul 2005 22:42:38 +0200
From: Christoph Theis <carrricky@example.org>
Reply-To: Christoph Theis <carrricky@example.org>
X-Priority: 3 (Normal)
Message-ID: <carrricky@example.org>
To: Jochen Wiedmann <carrricky@example.org>
Subject: Re: Bug in MinML?
In-Reply-To: <carrricky@example.org>
References: <carrricky@example.org> <carrricky@example.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N


Hello!

> please be so kind to create a context diff anyways. Obviously, you know
> the sources much better than I and most other committers do, so you'll
> help us a real lot.

I will try later. All I got now was a diff that removed all lines from
HEAD and added my version. No idea why, I didn't change that much ...

Anyway, John Wilson will be the one who can judge my idea as he is
the only one who really understands the parser. I will let it up to
him to decide if its really a bug and how to patch it.

Regards

Christoph



From xmlrpccarrricky@example.org Tue Jul 26 06:05:42 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 51375 invoked from network); 26 Jul 2005 06:05:42 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 26 Jul 2005 06:05:42 -0000
Received: (qmail 41301 invoked by uid 500); 26 Jul 2005 06:05:41 -0000
Delivered-To: carrricky@example.org
Received: (qmail 41214 invoked by uid 500); 26 Jul 2005 06:05:40 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 41201 invoked by uid 99); 26 Jul 2005 06:05:40 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 23:05:40 -0700
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 23:05:32 -0700
Received: by nproxy.gmail.com with SMTP id g2so162727nfe
        for <carrricky@example.org>; Mon, 25 Jul 2005 23:05:36 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=b4fElRCAcBor4JnEltYCRJaEPL7OLOjOwm0KF0U7cBxt2fjLz8ARIWVfo9RbcN5bi/rd0i5zY6UWBK9mckFnrcssIuCAMgcPmIsWaVe3uMmbdzhyCGoavbrQrQOsGc83jDzZCzrMN7nDIV3ZZGeaodLuJWfxlSkulymOpXJ6OlI=
Received: by 83.161.120.155 with SMTP id x9mr643nfh;
        Mon, 25 Jul 2005 23:05:36 -0700 (PDT)
Received: by 83.161.120.155 with HTTP; Mon, 25 Jul 2005 23:05:36 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Tue, 26 Jul 2005 08:05:36 +0200
From: Jochen Wiedmann <carrricky@example.org>
Reply-To: Jochen Wiedmann <carrricky@example.org>
To: carrricky@example.org, Christoph Theis <carrricky@example.org>
Subject: Re: Bug in MinML?
In-Reply-To: <carrricky@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
References: <carrricky@example.org> <carrricky@example.org>
	 <carrricky@example.org>
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

On 7/25/05, Christoph Theis <carrricky@example.org> wrote:

> Anyway, John Wilson will be the one who can judge my idea as he is
> the only one who really understands the parser. I will let it up to
> him to decide if its really a bug and how to patch it.

Even John will prefer to discuss a nice context diff.


Jochen


--=20
What are the first steps on the moon, compared to your child's?

From xmlrpccarrricky@example.org Tue Jul 26 10:08:21 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 32291 invoked from network); 26 Jul 2005 10:08:20 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 26 Jul 2005 10:08:20 -0000
Received: (qmail 32866 invoked by uid 500); 26 Jul 2005 10:08:19 -0000
Delivered-To: carrricky@example.org
Received: (qmail 32837 invoked by uid 500); 26 Jul 2005 10:08:18 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 32824 invoked by uid 99); 26 Jul 2005 10:08:17 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 03:08:17 -0700
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 03:08:10 -0700
Received: by nproxy.gmail.com with SMTP id x37so182541nfc
        for <carrricky@example.org>; Tue, 26 Jul 2005 03:08:14 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
        b=OY5I71qmHQLP2dSz9A0sDbnaqa00VfOoxLSdYLMeXw5tgugXbKrUtSlCWd3EZpPBxyXdcrLRhppBBsfrSNUDdVdlhztIehAxjfaZpW5dmmN8DdEzFRIz7jatwFnFwknxF8gX/BBNWSxBmgm9yiTW0P38Wexrryvp6KxrDgrltbQ=
Received: by 83.161.120.155 with SMTP id 17mr11069nfc;
        Tue, 26 Jul 2005 03:08:14 -0700 (PDT)
Received: by 83.161.120.155 with HTTP; Tue, 26 Jul 2005 03:08:14 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Tue, 26 Jul 2005 12:08:14 +0200
From: Henri Gomez <carrricky@example.org>
Reply-To: carrricky@example.org
To: carrricky@example.org
Subject: CommonsXmlRpcTransport and timeout
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

I does some works on CommonsXmlRpcTransport to add support for
connection and socket timeout.

To which branch should the code be commited ?

From xmlrpccarrricky@example.org Tue Jul 26 10:22:11 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 41055 invoked from network); 26 Jul 2005 10:22:10 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 26 Jul 2005 10:22:10 -0000
Received: (qmail 60024 invoked by uid 500); 26 Jul 2005 10:22:09 -0000
Delivered-To: carrricky@example.org
Received: (qmail 59994 invoked by uid 500); 26 Jul 2005 10:22:09 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 59974 invoked by uid 99); 26 Jul 2005 10:22:08 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 03:22:08 -0700
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 03:22:02 -0700
Received: by nproxy.gmail.com with SMTP id g2so177733nfe
        for <carrricky@example.org>; Tue, 26 Jul 2005 03:22:06 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=fyAfLMHddMjwRNE4vnnDUe70AKWBPyiBcCmr/45JuWkBOD9zbxqMObRhbIhGM3ra5SzGy9yxBU/WaluK0cS1EzeeE0Y5B2GFTO4+NNrl9vSPw13IrBWmUJJS3VR1cbFIJMLww8ICtu0rxxLuqiO+KsI77K1fFDeowDWvmF4JKGM=
Received: by 83.161.120.155 with SMTP id w6mr11439nfh;
        Tue, 26 Jul 2005 03:22:06 -0700 (PDT)
Received: by 83.161.120.155 with HTTP; Tue, 26 Jul 2005 03:22:06 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Tue, 26 Jul 2005 12:22:06 +0200
From: Jochen Wiedmann <carrricky@example.org>
Reply-To: Jochen Wiedmann <carrricky@example.org>
To: carrricky@example.org, carrricky@example.org
Subject: Re: CommonsXmlRpcTransport and timeout
In-Reply-To: <carrricky@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
References: <carrricky@example.org>
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

On 7/26/05, Henri Gomez <carrricky@example.org> wrote:
> I does some works on CommonsXmlRpcTransport to add support for
> connection and socket timeout.
>=20
> To which branch should the code be commited ?

I'd suggest both, if the changes are relatively minor.

--=20
What are the first steps on the moon, compared to your child's?

From xmlrpccarrricky@example.org Tue Jul 26 11:20:49 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 56885 invoked from network); 26 Jul 2005 11:20:49 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 26 Jul 2005 11:20:49 -0000
Received: (qmail 28324 invoked by uid 500); 26 Jul 2005 11:20:48 -0000
Delivered-To: carrricky@example.org
Received: (qmail 28154 invoked by uid 500); 26 Jul 2005 11:20:47 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 28139 invoked by uid 99); 26 Jul 2005 11:20:47 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 04:20:47 -0700
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 04:20:41 -0700
Received: by nproxy.gmail.com with SMTP id x37so187848nfc
        for <carrricky@example.org>; Tue, 26 Jul 2005 04:20:44 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=oV7U/iCYS5DtoKWuJfbtvVXuW3lBMbJtfZJ8LhMyTzCtZS7HXcS8DMemLXGOwVxAh0je8a2GqYrc0+dcP0b39675V85UAMXcQZX7hSef9pkyS5AnhpbVzapl2GHu/cRndt+nSXy66GxMHuzUfJ0N5JiZp3RccqZunaQKu4CS+0U=
Received: by 83.161.120.155 with SMTP id p11mr14937nfd;
        Tue, 26 Jul 2005 04:20:44 -0700 (PDT)
Received: by 83.161.120.155 with HTTP; Tue, 26 Jul 2005 04:20:44 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Tue, 26 Jul 2005 13:20:44 +0200
From: Henri Gomez <carrricky@example.org>
Reply-To: carrricky@example.org
To: carrricky@example.org, Jochen Wiedmann <carrricky@example.org>
Subject: Re: CommonsXmlRpcTransport and timeout
In-Reply-To: <carrricky@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
References: <carrricky@example.org>
	 <carrricky@example.org>
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

head and branch 2.0 ?

2005/7/26, Jochen Wiedmann <carrricky@example.org>:
> On 7/26/05, Henri Gomez <carrricky@example.org> wrote:
> > I does some works on CommonsXmlRpcTransport to add support for
> > connection and socket timeout.
> >
> > To which branch should the code be commited ?
>=20
> I'd suggest both, if the changes are relatively minor.
>=20
> --
> What are the first steps on the moon, compared to your child's?
>

From xmlrpccarrricky@example.org Tue Jul 26 12:09:31 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 76063 invoked from network); 26 Jul 2005 12:09:30 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 26 Jul 2005 12:09:30 -0000
Received: (qmail 98594 invoked by uid 500); 26 Jul 2005 12:09:30 -0000
Delivered-To: carrricky@example.org
Received: (qmail 98425 invoked by uid 500); 26 Jul 2005 12:09:29 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 98411 invoked by uid 500); 26 Jul 2005 12:09:29 -0000
Delivered-To: carrricky@example.org
Received: (qmail 98408 invoked by uid 99); 26 Jul 2005 12:09:29 -0000
X-ASF-Spam-Status: No, hits=-9.8 required=10.0
	tests=ALL_TRUSTED,NO_REAL_NAME
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Tue, 26 Jul 2005 05:09:18 -0700
Received: (qmail 75618 invoked by uid 1198); 26 Jul 2005 12:09:16 -0000
Date: 26 Jul 2005 12:09:16 -0000
Message-ID: <carrricky@example.org>
From: carrricky@example.org
To: carrricky@example.org
Subject: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc CommonsXmlRpcTransport.java
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

hgomez      2005/07/26 05:09:16

  Modified:    src/java/org/apache/xmlrpc Tag: XMLRPC_2_0_BRANCH
                        CommonsXmlRpcTransport.java
  Log:
  Add Timeout support for underlying HttpClient
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  83.161.120.155   +34 -9     ws-xmlrpc/src/java/org/apache/xmlrpc/CommonsXmlRpcTransport.java
  
  Index: CommonsXmlRpcTransport.java
  ===================================================================
  RCS file: /home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/CommonsXmlRpcTransport.java,v
  retrieving revision 1.7
  retrieving revision 83.161.120.155
  diff -u -r1.7 -r83.161.120.155
  --- CommonsXmlRpcTransport.java	28 Apr 2005 09:05:06 -0000	1.7
  +++ CommonsXmlRpcTransport.java	26 Jul 2005 12:09:16 -0000	83.161.120.155
  @@ -46,6 +46,13 @@
    */
   public class CommonsXmlRpcTransport implements XmlRpcTransport 
   {
  +    private URL           url;
  +    private HttpClient    client;
  +    private final Header  userAgentHeader = new Header("User-Agent", XmlRpc.version);
  +    private boolean       http11          = false; // defaults to HTTP 1.0
  +    private boolean       gzip            = false;
  +    private boolean       rgzip           = false;
  +    private Credentials   creds;
       
       protected PostMethod method;
   
  @@ -53,6 +60,7 @@
       public CommonsXmlRpcTransport(URL url, HttpClient client) 
       {
           this.url = url;
  +        
           if (client == null) 
           {
               HttpClient newClient = new HttpClient();
  @@ -69,14 +77,6 @@
           this(url, null);
       }
       
  -    private URL url;
  -    private HttpClient client;
  -    private final Header userAgentHeader = new Header("User-Agent", XmlRpc.version);
  -    private boolean http11 = false; // defaults to HTTP 1.0
  -    private boolean gzip = false;
  -    private boolean rgzip = false;
  -    private Credentials creds;
  -    
       public InputStream sendXmlRpc(byte[] request) throws IOException, XmlRpcClientException 
       {
           method = new PostMethod(url.toString());
  @@ -167,6 +167,31 @@
       }
   
       /**
  +     * Sets the socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the 
  +     * timeout for waiting for data. A timeout value of zero is interpreted as an 
  +     * infinite timeout.
  +     *
  +     * @param newTimeoutInMilliseconds Timeout in milliseconds
  +     */
  +    public void setTimeout(int timeout)
  +    {
  +        client.setTimeout(timeout);
  +    }
  +    
  +    /**
  +     * Sets the timeout until a connection is etablished. A timeout value of 
  +     * zero means the timeout is not used. The default value is zero.
  +     * 
  +     * @param newTimeoutInMilliseconds Timeout in milliseconds.
  +     * 
  +     * @see HttpConnection#setConnectionTimeout(int)
  +     */
  +    public void setConnectionTimeout(int ctimeout)
  +    {
  +        client.setConnectionTimeout(ctimeout);
  +    }
  +        
  +    /**
        * Sets Authentication for this client, very basic for now user/password
        * 
        * @param user
  
  
  

From xmlrpccarrricky@example.org Tue Jul 26 12:11:02 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 76618 invoked from network); 26 Jul 2005 12:11:02 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 26 Jul 2005 12:11:02 -0000
Received: (qmail 2461 invoked by uid 500); 26 Jul 2005 12:11:01 -0000
Delivered-To: carrricky@example.org
Received: (qmail 2432 invoked by uid 500); 26 Jul 2005 12:11:01 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 2419 invoked by uid 500); 26 Jul 2005 12:11:00 -0000
Delivered-To: carrricky@example.org
Received: (qmail 2416 invoked by uid 99); 26 Jul 2005 12:11:00 -0000
X-ASF-Spam-Status: No, hits=-9.8 required=10.0
	tests=ALL_TRUSTED,NO_REAL_NAME
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Tue, 26 Jul 2005 05:10:49 -0700
Received: (qmail 76522 invoked by uid 1198); 26 Jul 2005 12:10:47 -0000
Date: 26 Jul 2005 12:10:47 -0000
Message-ID: <carrricky@example.org>
From: carrricky@example.org
To: carrricky@example.org
Subject: cvs commit: ws-xmlrpc/src/java/org/apache/xmlrpc CommonsXmlRpcTransport.java
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

hgomez      2005/07/26 05:10:47

  Modified:    src/java/org/apache/xmlrpc CommonsXmlRpcTransport.java
  Log:
  Add Timeout support for underlying HttpClient
  
  Revision  Changes    Path
  1.8       +34 -9     ws-xmlrpc/src/java/org/apache/xmlrpc/CommonsXmlRpcTransport.java
  
  Index: CommonsXmlRpcTransport.java
  ===================================================================
  RCS file: /home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/CommonsXmlRpcTransport.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CommonsXmlRpcTransport.java	28 Apr 2005 09:05:06 -0000	1.7
  +++ CommonsXmlRpcTransport.java	26 Jul 2005 12:10:46 -0000	1.8
  @@ -46,6 +46,13 @@
    */
   public class CommonsXmlRpcTransport implements XmlRpcTransport 
   {
  +    private URL           url;
  +    private HttpClient    client;
  +    private final Header  userAgentHeader = new Header("User-Agent", XmlRpc.version);
  +    private boolean       http11          = false; // defaults to HTTP 1.0
  +    private boolean       gzip            = false;
  +    private boolean       rgzip           = false;
  +    private Credentials   creds;
       
       protected PostMethod method;
   
  @@ -53,6 +60,7 @@
       public CommonsXmlRpcTransport(URL url, HttpClient client) 
       {
           this.url = url;
  +        
           if (client == null) 
           {
               HttpClient newClient = new HttpClient();
  @@ -69,14 +77,6 @@
           this(url, null);
       }
       
  -    private URL url;
  -    private HttpClient client;
  -    private final Header userAgentHeader = new Header("User-Agent", XmlRpc.version);
  -    private boolean http11 = false; // defaults to HTTP 1.0
  -    private boolean gzip = false;
  -    private boolean rgzip = false;
  -    private Credentials creds;
  -    
       public InputStream sendXmlRpc(byte[] request) throws IOException, XmlRpcClientException 
       {
           method = new PostMethod(url.toString());
  @@ -167,6 +167,31 @@
       }
   
       /**
  +     * Sets the socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the 
  +     * timeout for waiting for data. A timeout value of zero is interpreted as an 
  +     * infinite timeout.
  +     *
  +     * @param newTimeoutInMilliseconds Timeout in milliseconds
  +     */
  +    public void setTimeout(int timeout)
  +    {
  +        client.setTimeout(timeout);
  +    }
  +    
  +    /**
  +     * Sets the timeout until a connection is etablished. A timeout value of 
  +     * zero means the timeout is not used. The default value is zero.
  +     * 
  +     * @param newTimeoutInMilliseconds Timeout in milliseconds.
  +     * 
  +     * @see HttpConnection#setConnectionTimeout(int)
  +     */
  +    public void setConnectionTimeout(int ctimeout)
  +    {
  +        client.setConnectionTimeout(ctimeout);
  +    }
  +        
  +    /**
        * Sets Authentication for this client, very basic for now user/password
        * 
        * @param user
  
  
  

From xmlrpccarrricky@example.org Tue Jul 26 12:18:54 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 78536 invoked from network); 26 Jul 2005 12:18:54 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 26 Jul 2005 12:18:54 -0000
Received: (qmail 7497 invoked by uid 500); 26 Jul 2005 12:18:53 -0000
Delivered-To: carrricky@example.org
Received: (qmail 7471 invoked by uid 500); 26 Jul 2005 12:18:53 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 7458 invoked by uid 99); 26 Jul 2005 12:18:53 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 05:18:53 -0700
X-ASF-Spam-Status: No, hits=0.0 required=10.0
	tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nproxy.gmail.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 05:18:46 -0700
Received: by nproxy.gmail.com with SMTP id g2so185785nfe
        for <carrricky@example.org>; Tue, 26 Jul 2005 05:18:50 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=UJpXjb6naP+7QO38JOrPnxwyNG/81N49rcthiKaae8o3i674yvU20mHSqLG+RgyTIOTuZd9kqC+fRdHd9l3d+EuAxd6ZmE0Ax2sydeamdH1uAtkVsYQlzFetWD4JE+x3jWI9Ruh5j50cBkBWruwsn/ByrPWRqJnNas8AR8Yqr9s=
Received: by 83.161.120.155 with SMTP id n2mr17381nfh;
        Tue, 26 Jul 2005 05:18:50 -0700 (PDT)
Received: by 83.161.120.155 with HTTP; Tue, 26 Jul 2005 05:18:50 -0700 (PDT)
Message-ID: <carrricky@example.org>
Date: Tue, 26 Jul 2005 14:18:50 +0200
From: Jochen Wiedmann <carrricky@example.org>
Reply-To: Jochen Wiedmann <carrricky@example.org>
To: carrricky@example.org
Subject: Re: CommonsXmlRpcTransport and timeout
Cc: carrricky@example.org
In-Reply-To: <carrricky@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
References: <carrricky@example.org>
	 <carrricky@example.org>
	 <carrricky@example.org>
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N

On 7/26/05, Henri Gomez <carrricky@example.org> wrote:
> head and branch 2.0 ?

Quite so. :-)


--=20
What are the first steps on the moon, compared to your child's?

From xmlrpccarrricky@example.org Wed Jul 27 04:47:57 2005
Return-Path: <xmlrpccarrricky@example.org>
Delivered-To: carrricky@example.org
Received: (qmail 75462 invoked from network); 27 Jul 2005 04:47:56 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 27 Jul 2005 04:47:56 -0000
Received: (qmail 83381 invoked by uid 500); 27 Jul 2005 04:47:55 -0000
Delivered-To: carrricky@example.org
Received: (qmail 83364 invoked by uid 500); 27 Jul 2005 04:47:54 -0000
Mailing-List: contact carrricky@example.org; run by ezmlm
Precedence: bulk
list-help: <mailto:carrricky@example.org>
list-unsubscribe: <mailto:carrricky@example.org>
List-Post: <mailto:carrricky@example.org>
Reply-To: carrricky@example.org
List-Id: <xmlrpc-dev.ws.apache.org>
Delivered-To: mailing list carrricky@example.org
Received: (qmail 83351 invoked by uid 99); 27 Jul 2005 04:47:54 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 21:47:54 -0700
X-ASF-Spam-Status: No, hits=1.2 required=10.0
	tests=PRIORITY_NO_NAME,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: domain of carrricky@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO mail.gmx.net) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Tue, 26 Jul 2005 21:47:47 -0700
Received: (qmail invoked by alias); 27 Jul 2005 04:47:50 -0000
Received: from M2403P019.adsl.highway.telekom.at (EHLO M2403P019.adsl.highway.telekom.at) [83.161.120.155]
  by mail.gmx.net (mp019) with SMTP; 27 Jul 2005 06:47:50 +0200
X-Authenticated: #16336033
Date: Wed, 27 Jul 2005 06:53:20 +0200
From: Christoph Theis <carrricky@example.org>
Reply-To: Christoph Theis <carrricky@example.org>
X-Priority: 3 (Normal)
Message-ID: <carrricky@example.org>
To: carrricky@example.org
Subject: Re: Bug in MinML?
In-Reply-To: <carrricky@example.org>
References: <carrricky@example.org> <carrricky@example.org>
 <carrricky@example.org> <carrricky@example.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N



> On 7/25/05, Christoph Theis <carrricky@example.org> wrote:

>> Anyway, John Wilson will be the one who can judge my idea as he is
>> the only one who really understands the parser. I will let it up to
>> him to decide if its really a bug and how to patch it.

> Even John will prefer to discuss a nice context diff.

OK, here is the diff.

The first sections adds a buffer.flush(). I had to do that because I
got an ArrayIndexOutOfBounds Exception when parsing large CDATA
sections: writing to the buffer hits the array boundary. But I dont
fully understand why that happens.

The second section is the problem I wrote about: Writing to the buffer
could overwrite the next character to read.

Regards
Christoph



Index: MinML.java
===================================================================
RCS file: /home/cvspublic/ws-xmlrpc/src/java/uk/co/wilson/xml/MinML.java,v
retrieving revision 1.3
diff -w -c -r1.3 MinML.java
*** MinML.java  18 Jan 2003 13:40:03 -0000      1.3
--- MinML.java  27 Jul 2005 04:29:20 -0000
***************
*** 357,362 ****
--- 357,363 ----
              }
  
              buffer.write(']');
+             buffer.flush();
              buffer.write(currentChar);
              continue;   // not end of CDATA section, don't change state
  
***************
*** 606,616 ****
--- 607,632 ----
      }
  
      public void write(final int c) throws IOException {
+       // flush if there is not enough space for the character
+       if (written && count == nextIn)
+         _flush();
+         
        written = true;
        chars[count++] = (char)c;
      }
  
      public void write(final char[] cbuf, final int off, final int len) throws IOException {
+       // flush if there is not enough space for the array
+       if (written && (count + len) > nextIn)
+           _flush();
+             
+       // Write single characters if there is still not enough space
+       if (count + len > nextIn) {
+         for (int i = 0; i < len; i++)
+           write(cbuf[off+i]);
+         return;
+       }
+         
        written = true;
        System.arraycopy(cbuf, off, chars, count, len);
        count += len;



{'source': 'Apache Software Foundation Public Mail Archives'}