Bug 69301 - wrong headers in access log http2 with trailers
Summary: wrong headers in access log http2 with trailers
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 9
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 9.0.x
Hardware: Macintosh Mac OS X 10.1
: P2 normal (vote)
Target Milestone: -----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-30 14:28 UTC by hypnoce
Modified: 2024-08-30 18:30 UTC (History)
0 users



Attachments
Unit test and fix (7.03 KB, patch)
2024-08-30 14:28 UTC, hypnoce
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hypnoce 2024-08-30 14:28:02 UTC
Created attachment 39858 [details]
Unit test and fix

Hi,

when logging an http2 request with trailers, headers get cleaned and replaced by the trailers, resulting in wrong access logs.

Attached the patch with test case and potential fix.

Let me know what you think.

Thanks
Comment 1 Mark Thomas 2024-08-30 17:01:47 UTC
Thanks for the report and the test case. It makes it so much easier for us to work with and is very much appreciated.

It is taking a little longer than expected to look at this as there is a timing issue. I think I have tracked it down to the test case (I thought initially it was in Tomcat's header handling). I need to write and test a fix. Hopefully later today.
Comment 2 Mark Thomas 2024-08-30 18:30:08 UTC
Fixed in:
- 11.0.x for 11.0.0-M25 onwards
- 10.1.x for 10.1.29 onwards
-  9.0.x for  9.0.94 onwards