mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-30 03:34:26 +03:00
Fix constness
This commit is contained in:
@@ -206,7 +206,7 @@ ParserHTML::~ParserHTML()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ParserHTML::filterErrors(xmlErrorPtr xmlError)
|
ParserHTML::filterErrors(const xmlError *xmlError)
|
||||||
{
|
{
|
||||||
dbgDebug(D_WAAP_PARSER_HTML)
|
dbgDebug(D_WAAP_PARSER_HTML)
|
||||||
<< "ParserHTML::filterErrors(): xmlError "
|
<< "ParserHTML::filterErrors(): xmlError "
|
||||||
@@ -245,7 +245,7 @@ ParserHTML::push(const char *data, size_t data_len)
|
|||||||
// Send zero-length chunk with "terminate" flag enabled to signify end-of-stream
|
// Send zero-length chunk with "terminate" flag enabled to signify end-of-stream
|
||||||
|
|
||||||
if (htmlParseChunk(m_pushParserCtxPtr, m_buf, 0, 1)) {
|
if (htmlParseChunk(m_pushParserCtxPtr, m_buf, 0, 1)) {
|
||||||
xmlErrorPtr xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
auto xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||||
if (xmlError && filterErrors(xmlError)) {
|
if (xmlError && filterErrors(xmlError)) {
|
||||||
dbgDebug(D_WAAP_PARSER_HTML)
|
dbgDebug(D_WAAP_PARSER_HTML)
|
||||||
<< "ParserHTML::push(): xmlError: code="
|
<< "ParserHTML::push(): xmlError: code="
|
||||||
@@ -320,7 +320,7 @@ ParserHTML::push(const char *data, size_t data_len)
|
|||||||
<< i;
|
<< i;
|
||||||
if (m_pushParserCtxPtr) {
|
if (m_pushParserCtxPtr) {
|
||||||
if (htmlParseChunk(m_pushParserCtxPtr, data + i, data_len - i, 0)) {
|
if (htmlParseChunk(m_pushParserCtxPtr, data + i, data_len - i, 0)) {
|
||||||
xmlErrorPtr xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
auto xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||||
if (xmlError && filterErrors(xmlError)) {
|
if (xmlError && filterErrors(xmlError)) {
|
||||||
dbgDebug(D_WAAP_PARSER_HTML)
|
dbgDebug(D_WAAP_PARSER_HTML)
|
||||||
<< "ParserHTML::push(): xmlError: code="
|
<< "ParserHTML::push(): xmlError: code="
|
||||||
|
@@ -68,7 +68,7 @@ private:
|
|||||||
|
|
||||||
// Filter out errors that should be ignored. Returns true if error should be treated,
|
// Filter out errors that should be ignored. Returns true if error should be treated,
|
||||||
// false if an error should be ignored
|
// false if an error should be ignored
|
||||||
bool filterErrors(xmlErrorPtr xmlError);
|
bool filterErrors(const xmlError *xmlError);
|
||||||
|
|
||||||
IParserStreamReceiver &m_receiver;
|
IParserStreamReceiver &m_receiver;
|
||||||
enum state m_state;
|
enum state m_state;
|
||||||
|
@@ -234,7 +234,7 @@ ParserXML::~ParserXML() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ParserXML::filterErrors(xmlErrorPtr xmlError) {
|
bool ParserXML::filterErrors(const xmlError *xmlError) {
|
||||||
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::filterErrors(): xmlError " << xmlError->code << ": '" <<
|
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::filterErrors(): xmlError " << xmlError->code << ": '" <<
|
||||||
xmlError->message << "'";
|
xmlError->message << "'";
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ size_t ParserXML::push(const char* data, size_t data_len) {
|
|||||||
// Send zero-length chunk with "terminate" flag enabled to signify end-of-stream
|
// Send zero-length chunk with "terminate" flag enabled to signify end-of-stream
|
||||||
|
|
||||||
if (xmlParseChunk(m_pushParserCtxPtr, m_buf, 0, 1)) {
|
if (xmlParseChunk(m_pushParserCtxPtr, m_buf, 0, 1)) {
|
||||||
xmlErrorPtr xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
auto xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||||
if (xmlError && filterErrors(xmlError)) {
|
if (xmlError && filterErrors(xmlError)) {
|
||||||
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::push(): xmlError: code=" << xmlError->code << ": '" <<
|
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::push(): xmlError: code=" << xmlError->code << ": '" <<
|
||||||
xmlError->message << "'";
|
xmlError->message << "'";
|
||||||
@@ -316,7 +316,7 @@ size_t ParserXML::push(const char* data, size_t data_len) {
|
|||||||
": '" << std::string(data + i, data_len - i) << "'; i=" << i;
|
": '" << std::string(data + i, data_len - i) << "'; i=" << i;
|
||||||
if (m_pushParserCtxPtr) {
|
if (m_pushParserCtxPtr) {
|
||||||
if (xmlParseChunk(m_pushParserCtxPtr, data + i, data_len - i, 0)) {
|
if (xmlParseChunk(m_pushParserCtxPtr, data + i, data_len - i, 0)) {
|
||||||
xmlErrorPtr xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
auto xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||||
if (xmlError && filterErrors(xmlError)) {
|
if (xmlError && filterErrors(xmlError)) {
|
||||||
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::push(): xmlError: code=" << xmlError->code <<
|
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::push(): xmlError: code=" << xmlError->code <<
|
||||||
": '" << xmlError->message << "'";
|
": '" << xmlError->message << "'";
|
||||||
|
@@ -83,7 +83,7 @@ private:
|
|||||||
|
|
||||||
// Filter out errors that should be ignored. Returns true if error should be treated,
|
// Filter out errors that should be ignored. Returns true if error should be treated,
|
||||||
// false if an error should be ignored
|
// false if an error should be ignored
|
||||||
bool filterErrors(xmlErrorPtr xmlError);
|
bool filterErrors(const xmlError *xmlError);
|
||||||
|
|
||||||
IParserStreamReceiver &m_receiver;
|
IParserStreamReceiver &m_receiver;
|
||||||
enum state m_state;
|
enum state m_state;
|
||||||
|
Reference in New Issue
Block a user