You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2021/12/23 16:31:47 UTC

[logging-log4j1] 02/02: Bug 43131: Remove dummy: protocol from XMLDecoder

This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch BRANCH_1_3_ABANDONED
in repository https://gitbox.apache.org/repos/asf/logging-log4j1.git

commit c5f4279081091e562c44bb753f6e52dc6be5fa52
Author: Curtis William Arnold <ca...@apache.org>
AuthorDate: Wed Aug 15 17:22:16 2007 +0000

    Bug 43131: Remove dummy: protocol from XMLDecoder
    
    git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/branches/BRANCH_1_3_ABANDONED@566272 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/log4j/xml/XMLDecoder.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/log4j/xml/XMLDecoder.java b/src/main/java/org/apache/log4j/xml/XMLDecoder.java
index 5836932..6d40c09 100644
--- a/src/main/java/org/apache/log4j/xml/XMLDecoder.java
+++ b/src/main/java/org/apache/log4j/xml/XMLDecoder.java
@@ -68,7 +68,7 @@ public class XMLDecoder implements Decoder {
      */
   private static final String BEGINPART =
     "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
-    + "<!DOCTYPE log4j:eventSet SYSTEM \"log4j.dtd\">"
+    + "<!DOCTYPE log4j:eventSet SYSTEM \"http://localhost/log4j.dtd\">"
     + "<log4j:eventSet version=\"1.2\" "
     + "xmlns:log4j=\"http://jakarta.apache.org/log4j/\">";
     /**
@@ -165,7 +165,6 @@ public class XMLDecoder implements Decoder {
 
       InputSource inputSource =
         new InputSource(new StringReader(buf.toString()));
-      inputSource.setSystemId("dummy://log4j.dtd");
       document = docBuilder.parse(inputSource);
     } catch (Exception e) {
       e.printStackTrace();