http2: log :authority header as hostname

Ticket: 8774
(cherry picked from commit 0b0606b126)
pull/16171/head
Philippe Antoine 2 weeks ago committed by Victor Julien
parent bae703386b
commit 19698065ec

@ -37,6 +37,7 @@ fn log_http2_headers<'a>(
common: &mut HashMap<HeaderName, &'a Vec<u8>>,
) -> Result<(), JsonError> {
let mut logged_headers = HashSet::new();
let mut has_auth = false;
for block in blocks {
// delay js.start_object() because we skip suplicate headers
match block.error {
@ -66,7 +67,11 @@ fn log_http2_headers<'a>(
"user-agent" => {
common.insert(HeaderName::UserAgent, &block.value);
}
"host" => {
":authority" => {
has_auth = true;
common.insert(HeaderName::Host, &block.value);
}
"host" if !has_auth => {
common.insert(HeaderName::Host, &block.value);
}
"content-length" => {

Loading…
Cancel
Save