Skip to content

Commit 05e9e7c

Browse files
committed
XML: Remove error messages from stderr
1 parent 42a16c7 commit 05e9e7c

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
v3.0.4 - YYYY-MMM-DD (to be released)
22
-------------------------------------
33

4+
- XML: Remove error messages from stderr
5+
[Issue #2010 - @JaiHarpalani, @zimmerle]
46
- Filter comment or blank line for pmFromFile operator
57
[Issue #1645 - @LeeShan87, @victorhora, @tdoubley]
68
- Additional adjustment to Cookie header parsing

src/request_body_processor/xml.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ bool XML::processChunk(const char *buf, unsigned int size,
9999
error->assign("XML: Failed to create parsing context.");
100100
return false;
101101
}
102+
103+
xmlSetGenericErrorFunc(m_data.parsing_ctx, null_error);
104+
102105
return true;
103106
}
104107

src/request_body_processor/xml.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ class XML {
5353
static xmlParserInputBufferPtr unloadExternalEntity(const char *URI,
5454
xmlCharEncoding enc);
5555

56+
static void null_error(void *ctx, const char *msg, ...) {
57+
}
58+
59+
5660
xml_data m_data;
5761

5862
private:

0 commit comments

Comments
 (0)