Fixed errrornous urls from merged private branch

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer 2021-01-24 21:15:19 +01:00
parent 5fe2f9c83a
commit f5ee685556
2 changed files with 12 additions and 12 deletions

View File

@ -47,9 +47,9 @@ public class XmlRpcResponse implements RpcResponse {
throws SAXException, ParserConfigurationException, IOException { throws SAXException, ParserConfigurationException, IOException {
SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser(); SAXParser saxParser = factory.newSAXParser();
factory.setFeature("https://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
saxParser.getXMLReader().setFeature("https://xml.org/sax/features/external-general-entities", false); saxParser.getXMLReader().setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("https://apache.org/xml/features/disallow-doctype-decl", true); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
InputSource inputSource = new InputSource(is); InputSource inputSource = new InputSource(is);
inputSource.setEncoding(encoding); inputSource.setEncoding(encoding);
saxParser.parse(inputSource, new XmlRpcHandler()); saxParser.parse(inputSource, new XmlRpcHandler());

View File

@ -79,9 +79,9 @@ public class UpnpXMLParser {
try { try {
SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser(); SAXParser saxParser = factory.newSAXParser();
factory.setFeature("https://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
saxParser.getXMLReader().setFeature("https://xml.org/sax/features/external-general-entities", false); saxParser.getXMLReader().setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("https://apache.org/xml/features/disallow-doctype-decl", true); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
saxParser.parse(new InputSource(new StringReader(xml)), handler); saxParser.parse(new InputSource(new StringReader(xml)), handler);
} catch (IOException e) { } catch (IOException e) {
// This should never happen - we're not performing I/O! // This should never happen - we're not performing I/O!
@ -138,9 +138,9 @@ public class UpnpXMLParser {
try { try {
SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser(); SAXParser saxParser = factory.newSAXParser();
factory.setFeature("https://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
saxParser.getXMLReader().setFeature("https://xml.org/sax/features/external-general-entities", false); saxParser.getXMLReader().setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("https://apache.org/xml/features/disallow-doctype-decl", true); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
saxParser.parse(new InputSource(new StringReader(xml)), handler); saxParser.parse(new InputSource(new StringReader(xml)), handler);
} catch (IOException e) { } catch (IOException e) {
// This should never happen - we're not performing I/O! // This should never happen - we're not performing I/O!
@ -185,9 +185,9 @@ public class UpnpXMLParser {
try { try {
SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser(); SAXParser saxParser = factory.newSAXParser();
factory.setFeature("https://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
saxParser.getXMLReader().setFeature("https://xml.org/sax/features/external-general-entities", false); saxParser.getXMLReader().setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("https://apache.org/xml/features/disallow-doctype-decl", true); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
saxParser.parse(new InputSource(new StringReader(xml)), handler); saxParser.parse(new InputSource(new StringReader(xml)), handler);
} catch (IOException e) { } catch (IOException e) {
// This should never happen - we're not performing I/O! // This should never happen - we're not performing I/O!