[#1648] Make sure trailing headers are not dropped during content encoding/decoding