You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2024/04/14 20:38:00 UTC
[jira] [Updated] (IO-831) http URI origins don't work
[ https://issues.apache.org/jira/browse/IO-831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated IO-831:
-------------------------------
Priority: Major (was: Blocker)
> http URI origins don't work
> ---------------------------
>
> Key: IO-831
> URL: https://issues.apache.org/jira/browse/IO-831
> Project: Commons IO
> Issue Type: Bug
> Reporter: Elliotte Rusty Harold
> Priority: Major
>
> I think file URLs might work but http/https URLs, much more common, don't. I'm not yet sure if this can be fixed without changing the API.
> @Test
> public void testReadFromURL() throws URISyntaxException, IOException {
> final URIOrigin origin = new URIOrigin(new URI("https://www.yahoo.com"));
> try (final InputStream in = origin.getInputStream()) {
> assertNotEquals(-1, in.read());
> }
> }
> java.nio.file.FileSystemNotFoundException: Provider "https" not installed
> at java.nio.file.Paths.get(Paths.java:147)
> at org.apache.commons.io.build.AbstractOrigin$URIOrigin.getPath(AbstractOrigin.java:402)
> at org.apache.commons.io.build.AbstractOrigin.getInputStream(AbstractOrigin.java:540)
> at org.apache.commons.io.build.URIOriginTest.testReadFromURL(URIOriginTest.java:47)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at java.util.ArrayList.forEach(ArrayList.java:1257)
> at java.util.ArrayList.forEach(ArrayList.java:1257)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)