Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/util URL.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/util URL.java

Author dlr
Full name Daniel Rall
Date 2001-04-07 14:40:51 PDT
Message User: dlr
  Date: 01/04/07 14:40:51

  Modified: java/org/joist/util URL.java
  Log:
  Added a new appendCGISeparator(StringBuffer buf, String url) macro.
  
  Revision Changes Path
  1.37 +14 -2 joist/java/org/joist​/util/URL.java
  
  Index: URL.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/URL.java,​v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- URL.java 2001/04/02 22:09:35 1.36
  +++ URL.java 2001/04/07 21:40:51 1.37
  @@ -65,7 +65,7 @@
    *
    * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
    * @author <a href="mailto:dlr@col​lab.net">Daniel Rall</a>
  - * @version $Id: URL.java,v 1.36 2001/04/02 22:09:35 dlr Exp $
  + * @version $Id: URL.java,v 1.37 2001/04/07 21:40:51 dlr Exp $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999-2001 CollabNet, Inc.
  @@ -243,12 +243,24 @@
       private static String appendCGIParam (StringBuffer buf, String url,
                                             String name, String value)
       {
  - buf.append(url.indexOf('?') == -1 ? '?' : '&');
  + appendCGISeparator(buf, url);
           if (name != null) buf.append(URLEncode​r.encode(name)).appe​nd('=');
           buf.append(URLEncode​r.encode(value));
           return buf.toString();
       }
       
  + /**
  + * Appends the CGI parameter separator character appropriate for
  + * the supplied URL to the specified buffer.
  + *
  + * @param buf The buffer to write to.
  + * @param url The URL to append to.
  + */
  + public static final void appendCGISeparator(StringBuffer buf, String url)
  + {
  + buf.append(url.indexOf('?') == -1 ? '?' : '&');
  + }
  +
       /**
        * If port is default for the protocol, we return null else we pull port
        * for the passed in protocol from inProperties.

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: joist/java/org/joist/util URL.java dlr Daniel Rall 2001-04-07 14:40:51 PDT
Messages per page: