From fe9da8acd6493995f53da1dcaa8ec22042196f64 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Tue, 15 Jul 2025 14:58:49 +0200 Subject: [PATCH] http2: do not log empty objects for request or response Ticket: 7741 --- etc/schema.json | 2 ++ rust/src/http2/logger.rs | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/etc/schema.json b/etc/schema.json index 2ba472f5aa..97d5657195 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -2083,6 +2083,7 @@ "request": { "type": "object", "additionalProperties": false, + "minProperties": 1, "properties": { "error_code": { "type": "string" @@ -2114,6 +2115,7 @@ "response": { "type": "object", "additionalProperties": false, + "minProperties": 1, "properties": { "error_code": { "type": "string" diff --git a/rust/src/http2/logger.rs b/rust/src/http2/logger.rs index c231f599e4..2197d7a83e 100644 --- a/rust/src/http2/logger.rs +++ b/rust/src/http2/logger.rs @@ -270,13 +270,23 @@ fn log_http2(tx: &HTTP2Transaction, js: &mut JsonBuilder) -> Result