/[classpath]/classpath/java/net/URLStreamHandler.java
ViewVC logotype

Diff of /classpath/java/net/URLStreamHandler.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35 by tromey, Sun Oct 2 22:58:41 2005 UTC revision 1.36 by rschuster, Fri Oct 14 22:35:19 2005 UTC
# Line 515  public abstract class URLStreamHandler Line 515  public abstract class URLStreamHandler
515          sb.append(":");          sb.append(":");
516        }        }
517            
518      if (authority.length() != 0)      // If we have superfluous leading slashes (that means, at least 2)
519        {      // we always add the authority component ("//" + host) to
520          sb.append("//").append(authority);      // avoid ambiguity. Otherwise we would generate an URL like
521        }      // proto://home/foo
522        // where we meant:
523      sb.append(file);      // host: <empty> - file: //home/foo
524        // but URL spec says it is:
525        // host: home - file: /foo
526        if (authority.length() != 0 || file.startsWith("//") )
527          sb.append("//").append(authority).append(file);
528        else
529          sb.append(file);
530    
531      if (ref != null)      if (ref != null)
532        sb.append('#').append(ref);        sb.append('#').append(ref);

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26