You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by le...@apache.org on 2001/09/05 00:03:50 UTC

cvs commit: xml-rpc/src/java/org/apache/xmlrpc XmlRpcServer.java

leonardr    01/09/04 15:03:50

  Modified:    src/java/org/apache/xmlrpc XmlRpcServer.java
  Log:
  Clear the StringBuffer before processing a new request; otherwise, data from old requests piles up and the client gets junk. This patch inspected by operator #23. (dlr)
  
  Revision  Changes    Path
  1.2       +6 -1      xml-rpc/src/java/org/apache/xmlrpc/XmlRpcServer.java
  
  Index: XmlRpcServer.java
  ===================================================================
  RCS file: /home/cvs/xml-rpc/src/java/org/apache/xmlrpc/XmlRpcServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XmlRpcServer.java	2001/07/20 19:38:18	1.1
  +++ XmlRpcServer.java	2001/09/04 22:03:49	1.2
  @@ -157,7 +157,13 @@
           {
               inParams = new Vector ();
               if (strbuf == null)
  +            {
                   strbuf = new StringBuffer ();
  +            }
  +            else
  +            {
  +                strbuf.setLength (0);
  +            }
   
               long now = System.currentTimeMillis ();
   
  @@ -212,7 +218,6 @@
                   XmlWriter writer = new XmlWriter (strbuf);
                   writeResponse (outParam, writer);
                   result = writer.getBytes ();
  -
               }
               catch (Exception x)
               {