History log of /libcore/luni/src/test/java/libcore/java/net/URLTest.java
Revision Date Author Comments
bb1546d2c87c6f7e996a83b6f0efca17453d53db 18-Oct-2012 Brian Carlstrom <bdc@google.com> Make sure URL.toURILenient throws the proper exception on trailing garbage escape

Previously this would throw IndexOutOfBoundsException instead of the proper checked exception.

Bug: 7369778
Change-Id: I4247240b21a98688bd890c53f654f7a030d72717
dc24b1b274a6110a56993849c8e93033e0c2f1ff 21-Sep-2012 Jesse Wilson <jwilson@squareup.com> Add tests for underscores in URLs.

We're between a rock and a hard place on this. The RFCs say
that underscores aren't permitted in URLs. But browsers have
historically permitted them, and so there are websites that
depend upon them.

Attempting to support the de-facto standard rather than the
spec is difficult because support isn't universal. Mail servers
don't handle them. Internet Explorer loses cookies on them.

Further complicating things is that we can't easily support
underscores in hostnames in HttpURLConnection without also
adding support for that to java.net.URI. This would cause
awkward behavior in class that can be used for its strict
validation.

I'm recommending we stay spec-compliant. If its a major
problem for anyone, they can fix their servers.

Change-Id: I5135e0de20e11275e2459a67ec9e7c0d07b8a35b
http://code.google.com/p/android/issues/detail?id=37577
b416ef5dc224630af2b9393a15ae120b27e4864a 14-Dec-2011 Jesse Wilson <jessewilson@google.com> Rename SerializableTester to SerializationTester

Change-Id: Idfaea5c474eb3cabfb8eefc5aa25a7ff0cce26ea
d0d626655f1d452070d3116678037e8759f807f4 10-Nov-2011 Jesse Wilson <jessewilson@google.com> Don't NullPointerException when a URL contains a space.

We end up creating a URI of http://and%20roid which has no host
name part because and%20roid is not a valid host name. It's unclear
where the best place to fail is. This is consistent with the RI
which doesn't fail until it attempts to connect.

Bug: http://code.google.com/p/android/issues/detail?id=16895
Change-Id: Ifa4dc3c651f4627e27622ed5cedfa820f9a35358
98c564c72480313ae2954a7f0b666ff94345a2f1 25-Jul-2011 Jesse Wilson <jessewilson@google.com> Only permit square brackets on IPv6 addresses.

We were failing two tests in URLTest because we were accepting
IPv4 addresses and host names.

Note that in the RI, URL is extremely lenient on validating the
characters in the parts of a URL. It permits any character in any
part except for the delimiter characters like '/' or ':'. The
lax IPv6 check 'does it contain a colon?' is consistent with the
RI.

Change-Id: I957f2ee610b72cf68a7773b4c02a4b6d5fcbb9de
c68609e723a5daa20888abdb640799d4353fd590 27-May-2011 Jesse Wilson <jessewilson@google.com> Document java.net.URI.

Change-Id: I941ba9cb4a2d48b052c25b7799ac466549df8d53
http://b/2753295
10527ac8763cc50fa9eca0d4ce495909899f0b9a 25-May-2011 Jesse Wilson <jessewilson@google.com> Parity between URI and URL tests.

Duplication here is unfortunate. It would be a lot of work
to share tests here, since the two classes have necessarily
different behaviors in certain situations. I continue to work
on making the two classes consistent with browsers, which
means they'll be more consistent with each other.

Change-Id: Ic33c414abe1344cdfd1a9b539d9918dcd074f2c6
http://b/2753295
5292410e4ebf7fb5149eefd2f52fcb94c46690a6 24-May-2011 Jesse Wilson <jessewilson@google.com> Rewrite parsing for java.net.URL.

This fixes many broken cases on handling relative URLs.

We normalize all URLs by default. This will result
in more URL equality than before. Previously the URLs
http://android.com/a/../ and http://android.com/ were not
equal; now they are equal.

Change-Id: I8cf7be2e42eeb1386520be2698d8f14e0a55decb
http://b/4361656
8f99aa098c6a06b8be788abbca1c1d1060342709 21-May-2011 Jesse Wilson <jessewilson@google.com> Cosmetic cleanup of java.net.URL.

Update the documentation to be closer to reality.

Change-Id: Ic187efde5d83c6bfcdc80428429a2d0f186d9d0a
http://b/2753295
6c434a1215049a76ba82fea69e8c5aa76cad955b 21-Feb-2011 Jesse Wilson <jessewilson@google.com> Fix URL.equals() to not throw on null hosts.

Change-Id: Ib89c902a10b28dc7e78600b44a3f1ff230f9b553
http://b/3474668
7e00db4156e50ce5f20fefb820dca339299134d3 30-Jan-2011 Jesse Wilson <jessewilson@google.com> Don't do DNS lookups in URL.equals()

Change-Id: Iea9becdb3a16eab054f9073719c77c2215ce0208
http://b/3045867
8fd0225a5c3918fe0cd4680258388985c25533e5 06-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix some of the most obvious bugs in URLStreamHandler's URL parsing.

Change-Id: I73ce6ccc169405e993d572ac3bf3af9ba39699c9
http://b/2753295
http://code.google.com/p/android/issues/detail?id=12724
6470a3002a17d866f067d68528217ee6272d47cb 30-Nov-2010 Elliott Hughes <enh@google.com> Regression test for URL(String) constructor bug.

Bug: http://code.google.com/p/android/issues/detail?id=12724
Change-Id: I354a7eda929d615fd81c100950505d726a4345ac