Change http_version field in JSON audit log to string

Sometimes m_httpVersion variable can be empty and then invalid JSON is generated
This commit is contained in:
Jakub Onderka 2025-04-23 10:59:10 +02:00
parent 6408bf9237
commit 797f7dc4b2

View File

@ -1599,7 +1599,7 @@ std::string Transaction::toJSON(int parts) {
utils::string::dash_if_empty(
m_variableRequestMethod.evaluate()));
LOGFY_ADD_INT("http_version", m_httpVersion.c_str());
LOGFY_ADD("http_version", m_httpVersion);
LOGFY_ADD("uri", this->m_uri);
if (parts & audit_log::AuditLog::CAuditLogPart) {