Author: tilman
Date: Thu Aug 13 09:06:20 2026
New Revision: 1937091
Log:
PDFBOX-5660: remove outdated
Modified:
pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
Modified:
pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
==============================================================================
---
pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
Thu Aug 13 09:06:16 2026 (r1937090)
+++
pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
Thu Aug 13 09:06:20 2026 (r1937091)
@@ -388,7 +388,7 @@ public class SigUtils
/**
* Like {@link URL#openStream()} but will follow redirection from http to
https.
*
- * @param urlString
+ * @param urlString http URL string
* @return
* @throws MalformedURLException
* @throws IOException
@@ -396,10 +396,9 @@ public class SigUtils
public static InputStream openURL(String urlString) throws
MalformedURLException, IOException
{
URL url = new URL(urlString);
- if (!urlString.startsWith("http"))
+ if (!url.getProtocol().startsWith("http"))
{
- // so that ftp is still supported
- return url.openStream();
+ throw new IOException(url.getProtocol() + " protocol not
supported");
}
HttpURLConnection con = (HttpURLConnection) url.openConnection();
int responseCode = con.getResponseCode();