From 651b0eb49a271c81a38f99922eb6a7fb7f3a9467 Mon Sep 17 00:00:00 2001 From: Dain Date: Fri, 2 Dec 2011 15:46:36 -0700 Subject: [PATCH] Add rudimentary support for http/https protocols in URL. --- classpath/java/net/URL.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classpath/java/net/URL.java b/classpath/java/net/URL.java index eb46c61860..6cd8e92095 100644 --- a/classpath/java/net/URL.java +++ b/classpath/java/net/URL.java @@ -81,7 +81,11 @@ public final class URL { private static URLStreamHandler findHandler(String protocol) throws MalformedURLException { - if ("resource".equals(protocol)) { + if ("http".equals(protocol)) { + return new avian.file.Handler(); + } else if ("https".equals(protocol)) { + return new avian.file.Handler(); + } else if ("resource".equals(protocol)) { return new avian.resource.Handler(); } else if ("file".equals(protocol)) { return new avian.file.Handler();