Skip to content

Commit 797f7dc

Browse files
committed
Change http_version field in JSON audit log to string
Sometimes m_httpVersion variable can be empty and then invalid JSON is generated
1 parent 6408bf9 commit 797f7dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transaction.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ std::string Transaction::toJSON(int parts) {
15991599
utils::string::dash_if_empty(
16001600
m_variableRequestMethod.evaluate()));
16011601

1602-
LOGFY_ADD_INT("http_version", m_httpVersion.c_str());
1602+
LOGFY_ADD("http_version", m_httpVersion);
16031603
LOGFY_ADD("uri", this->m_uri);
16041604

16051605
if (parts & audit_log::AuditLog::CAuditLogPart) {

0 commit comments

Comments
 (0)