Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: MODIFIED: util ...

Project highlights: Architectural Overview

joist
Discussion topic

Hide all messages in topic

All messages in topic

CVS update: MODIFIED: util ...

Author ms
Full name zxcv
Date 2001-05-04 17:21:55 PDT
Message User: ms
  Date: 01/05/04 17:21:55

  Modified: java/org/joist/util URL.java
  Log:
  added the rest of the hex hex values to encode
  
  Revision Changes Path
  1.39 +47 -5 joist/java/org/joist​/util/URL.java
  
  http://joist.tigris.​org/source/browse/jo​ist/java/org/joist/u​til/URL.java.diff?r1​=1.38&r2=1.39
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: URL.java
  ====================​====================​====================​=======
  RCS file: /usr/local/tigris/da​ta/helm/cvs/reposito​ry/joist/java/org/jo​ist/util/URL.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -b -r1.38 -r1.39
  --- URL.java 2001/05/04 23:34:46 1.38
  +++ URL.java 2001/05/05 00:21:55 1.39
  @@ -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.38 2001/05/04 23:34:46 ms Exp $
  + * @version $Id: URL.java,v 1.39 2001/05/05 00:21:55 ms Exp $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999-2001 CollabNet, Inc.
  @@ -128,10 +128,18 @@
        */
       private static final boolean DEBUG = true;
   
  - /**
  - * Base64 value for space
  - */
  + // URL % HEX HEX values that need escaping
       public static final String URL_SPACE = "%20";
  + public static final String URL_EXCLAM = "%21";
  + public static final String URL_DBL_QUOTE = "%22";
  + public static final String URL_POUND = "%23";
  + public static final String URL_DOLLAR = "%24";
  + public static final String URL_PERCENT = "%25";
  + public static final String URL_AMPERSAND = "%26";
  + public static final String URL_SINGLE_QUOTE = "%27";
  + public static final String URL_LEFT_PAREN = "%28";
  + public static final String URL_RIGHT_PAREN = "%29";
  +
       /**
        * Tests for inclusion of a protocol in the specified URL. Useful when
        * determining whether or not a URL is local.
  @@ -393,6 +401,40 @@
                    case ' ':
                        clean.append(URL_SPACE);
                        break;
  + case '!':
  + clean.append(URL_EXCLAM);
  + break;
  + case '"':
  + clean.append(URL_DBL_QUOTE);
  +
  + case '#':
  + clean.append(URL_POUND);
  + break;
  +
  + case '$':
  + clean.append(URL_DOLLAR);
  + break;
  +
  + case '%':
  + clean.append(URL_PERCENT);
  + break;
  +
  + case '&':
  + clean.append(URL_AMPERSAND);
  + break;
  +
  + case '\'':
  + clean.append(URL_SINGLE_QUOTE);
  + break;
  +
  + case '(':
  + clean.append(URL_LEFT_PAREN);
  + break;
  +
  + case ')':
  + clean.append(URL_RIGHT_PAREN);
  + break;
  +
                    default:
                        clean.append(uncleanChars[i]);
                }
  
  
  

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@jois​t.tigris.org
For additional commands, e-mail: cvs-help at joist dot tigris dot org
Messages per page: