Skip to content

Commit b9dc9cc

Browse files
committed
Disable parser errors being printed to stderr
1 parent 624a0de commit b9dc9cc

File tree

1 file changed

+4
-0
lines changed
  • src/request_body_processor

1 file changed

+4
-0
lines changed

src/request_body_processor/xml.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ bool XML::processChunk(const char *buf, unsigned int size,
249249
error->assign("XML: Failed to create parsing context.");
250250
return false;
251251
}
252+
// disable parser errors being printed to stderr
253+
m_data.parsing_ctx->options |= XML_PARSE_NOWARNING | XML_PARSE_NOERROR;
252254
}
253255

254256
if (m_transaction->m_secXMLParseXmlIntoArgs
@@ -265,6 +267,8 @@ bool XML::processChunk(const char *buf, unsigned int size,
265267
error->assign("XML: Failed to create parsing context for ARGS.");
266268
return false;
267269
}
270+
// disable parser errors being printed to stderr
271+
m_data.parsing_ctx_arg->options |= XML_PARSE_NOWARNING | XML_PARSE_NOERROR;
268272
}
269273

270274
return true;

0 commit comments

Comments
 (0)