https://bz.apache.org/bugzilla/show_bug.cgi?id=64166
Bug ID: 64166 Summary: RequestDumperFilter duplicates headers Product: Tomcat 9 Version: 9.0.x Hardware: PC Status: NEW Severity: minor Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: gpeter...@bravurasolutions.com Target Milestone: ----- Created attachment 37031 --> https://bz.apache.org/bugzilla/attachment.cgi?id=37031&action=edit Patch to correct logging of response headers The RequestDumper attempts to log the outgoing headers by first obtaining the header names, then for each header name it outputs the values for that header. The problem is that the header names are not unique, so if there are two cookies, there are two Set-Cookie headers. The dumper uses the getHeaders method, which returns all values for the named header. Since it sees the Set-Cookie header twice, calling getHeaders returns both values, so it logs both values for each occurrence of the Set-Cookie header, so we see each cookie twice in the request log. Attached patch ensures headers are unique before logging. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org