hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.07k stars 1.55k forks source link

fix(http1): improve debug messages when sending trailers #3641

Closed hjr3 closed 2 months ago

hjr3 commented 2 months ago

When the "trailer" header was not found in the response, the debug message would say "attempted to encode trailers for non-chunked response". This was quite misleading as the response was chunked. We now include a better debug message that hints to the user that the "trailer" header was not specified.

When a chunked response contained a trailer header that did not match the header names specified in the "trailer" response header, there was no debug message to the user. We now include debug messages that tell the user if the header name is not allowed and if the header name was not specified in the "trailer" response header.