Absolute URL parsing bug
Andrew Haley
aph@redhat.com
Mon Jul 4 17:06:00 GMT 2005
Thanks to Per's reasoning I have a better patch.
When creating a URL: if the spec is absolute and a context URL is
supplied, we should inherit the host:port part of the context if its
protocol the same as that of the spec, but we should not inherit its
file path.
Andrew.
2005-07-04 Andrew Haley <aph@redhat.com>
* java/net/URL.java (URL): Don't inherit the path component when
the scheme component of the context matches the scheme component
of the spec.
Index: URL.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/URL.java,v
retrieving revision 1.51
diff -p -2 -c -r1.51 URL.java
*** URL.java 27 Apr 2005 20:10:07 -0000 1.51
--- URL.java 4 Jul 2005 16:45:42 -0000
*************** public final class URL implements Serial
*** 409,413 ****
host = context.host;
port = context.port;
- file = context.file;
userInfo = context.userInfo;
if (file == null || file.length() == 0)
--- 409,412 ----
More information about the Java-patches
mailing list