httpservices/src/main/java/ucar/httpservices/HTTPUtil.java
static public String
    canonicalpath(String path)
    {
        if(path == null) return null;
        StringBuilder b = new StringBuilder(path);
        canonicalpath(b);
        return b.toString();
    }
static public String
    canonicalpath(String path)
    {
        if(path == null) return null;
        StringBuilder b = new StringBuilder(path);
        canonicalpath(b);
        return b.toString();
    }
static public String canonicalpath ( String path ) { if ( path == null ) return null ; StringBuilder b = new StringBuilder ( path ) ; canonicalpath ( b ) ; return b . toString ( ) ; }
Convert path to use '/' consistently and
to remove any trailing '/'

@param path convert this path
@return canonicalized version
Convert path to use / consistently and to remove any trailing /