mbecke      2003/07/31 18:46:00

  Modified:    httpclient/src/java/org/apache/commons/httpclient Tag:
                        HTTPCLIENT_2_0_BRANCH URI.java
  Log:
  Changed URI.normalize() to ignore relative path normalization.
  Submitted by: Michael Becke
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.36.2.2  +13 -7     
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java
  
  Index: URI.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java,v
  retrieving revision 1.36.2.1
  retrieving revision 1.36.2.2
  diff -u -r1.36.2.1 -r1.36.2.2
  --- URI.java  11 Jul 2003 21:52:07 -0000      1.36.2.1
  +++ URI.java  1 Aug 2003 01:46:00 -0000       1.36.2.2
  @@ -3481,13 +3481,19 @@
   
   
       /**
  -     * Normalize the path part of this URI.
  +     * Normalizes the path part of this URI.  Normalization is only meant to be 
performed on 
  +     * URIs with an absolute path.  Calling this method on a relative path URI will 
have no
  +     * effect.
        *
        * @throws URIException no more higher path level to be normalized
  +     * 
  +     * @see #isAbsPath()
        */
       public void normalize() throws URIException {
  -        _path = normalize(_path);
  -        setURI();
  +        if (isAbsPath()) {
  +            _path = normalize(_path);
  +            setURI();
  +        }
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to